Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(mcp): build tool schemas per call instead of keeping all at boot (#92764)

Jake Ruthe37024b87298
diff --git a/.oxlintrc.json b/.oxlintrc.json
index 4145d40e077a..5f41726e894a 100644
--- a/.oxlintrc.json
+++ b/.oxlintrc.json
@@ -201,6 +201,12 @@
"no-useless-escape": "off"
}
},
+ {
+ "files": ["services/mcp/src/generated/**/*.ts", "services/mcp/src/tools/generated/**/*.ts"],
+ "rules": {
+ "@typescript-eslint/explicit-function-return-type": "off"
+ }
+ },
{
"files": ["services/mcp/src/ui-apps/**/*.{ts,tsx}"],
"rules": {
diff --git a/.prettierignore b/.prettierignore
index ac9b11bbb190..8040529e9233 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -3,3 +3,8 @@
# ignorePatterns, which explicit arguments bypass.
# CI regenerates this file and requires it byte-identical to the compiler's output (ci-hog.yml).
common/hogvm/typescript/src/stl/bytecode.ts
+
+# The MCP server's generated Zod modules keep the generator's layout; a formatter
+# pass would re-indent every schema body under the builder arrow (see
+# services/mcp/scripts/generate-orval-schemas.mjs).
+services/mcp/src/generated/
diff --git a/docs/published/handbook/engineering/ai/implementing-mcp-tools.md b/docs/published/handbook/engineering/ai/implementing-mcp-tools.md
index 2e1e3c102501..6eeacdbc82b4 100644
--- a/docs/published/handbook/engineering/ai/implementing-mcp-tools.md
+++ b/docs/published/handbook/engineering/ai/implementing-mcp-tools.md
@@ -267,6 +267,8 @@ Product teams own their definitions and control which operations are exposed as
#### Custom input schemas
By default, tool input schemas are auto-derived from OpenAPI via Orval.
+ The generated exports in `src/generated/<product>/api.ts` are builder functions, so call them (`FeatureFlagsCreateBody()`) wherever you import one.
+ A schema then exists only while a call uses it, and the server does not keep every schema in memory.
When the auto-derived schema isn't ideal for an LLM tool interface,
you can override it at two levels:
diff --git a/services/mcp/.prettierignore b/services/mcp/.prettierignore
new file mode 100644
index 000000000000..61fcde75225e
--- /dev/null
+++ b/services/mcp/.prettierignore
@@ -0,0 +1,5 @@
+# Read by oxfmt as a default ignore file when commands run from this package.
+# The generated Zod modules keep the exact layout the generator writes (see
+# scripts/generate-orval-schemas.mjs): a formatter pass would re-indent every
+# schema body under the builder arrow and turn regenerations into full-file diffs.
+src/generated/
diff --git a/services/mcp/definitions/README.md b/services/mcp/definitions/README.md
index f7bc187a8a3b..5acb3ad73554 100644
--- a/services/mcp/definitions/README.md
+++ b/services/mcp/definitions/README.md
@@ -20,7 +20,7 @@ OpenAPI schema (Django)
▼
YAML definitions ← product teams enable tools, add scopes/annotations/descriptions
│
- ├──► generate-orval-schemas → Zod schemas from OpenAPI (src/generated/{product}/api.ts)
+ ├──► generate-orval-schemas → Zod schema builders from OpenAPI (src/generated/{product}/api.ts)
│
└──► generate-tools → TypeScript handlers (src/tools/generated/{product}.ts)
JSON definitions (schema/generated-tool-definitions.json)
diff --git a/services/mcp/scripts/generate-orval-schemas.mjs b/services/mcp/scripts/generate-orval-schemas.mjs
index f6739d91b323..6d9220ff7c4c 100644
--- a/services/mcp/scripts/generate-orval-schemas.mjs
+++ b/services/mcp/scripts/generate-orval-schemas.mjs
@@ -26,6 +26,7 @@ import {
} from '@posthog/openapi-codegen'
import { discoverDefinitions, resolveSchemaPath } from './lib/definitions.mjs'
+import { lazifyZodSchemas } from './lib/lazy-zod-schemas.mjs'
import { stripEnumMinLength, stripUuidFormat } from './lib/schema-transforms.mjs'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
@@ -175,18 +176,30 @@ function prepareOrval(moduleName, filteredSchema, tmpDir) {
}
function postprocessOrvalOutput(outputFile) {
- // Annotate top-level exported Zod expressions with @__PURE__ so esbuild
- // can tree-shake unused schemas out of the bundle.
const generated = fs.readFileSync(outputFile, 'utf-8')
const withoutRedundantEnumDescriptions = generated.replace(
/\n\s*\.describe\(\n\s*(['"`])\* `(?:\\.|(?!\1)[\s\S])*?\1\n\s*\)(?=\s*(?:\.(?:optional|nullish)\(\)\s*)?\.describe\()/g,
''
)
- const annotated = withoutRedundantEnumDescriptions.replace(
- /^(export const \w+ =) (zod\.)/gm,
- '$1 /* @__PURE__ */ $2'
- )
- fs.writeFileSync(outputFile, annotated)
+ fs.writeFileSync(outputFile, withoutRedundantEnumDescriptions)
+}
+
+// The generated modules are exempt from oxfmt (.prettierignore), so the layout
+// this pipeline writes is what stays in the repo. Format the raw Orval output
+// once with the ignore file bypassed, then rewrite the exports into builder
+// functions with a splice that keeps every other line untouched. A formatter
+// pass over the builder form would move the body of every schema one indent
+// level and turn a regeneration into a full-file diff.
+function formatGeneratedFiles(files) {
+ const emptyIgnore = path.join(os.tmpdir(), 'oxfmt-empty-ignore')
+ fs.writeFileSync(emptyIgnore, '')
+ const result = spawnSync('pnpm', ['exec', 'oxfmt', '--ignore-path', emptyIgnore, ...files], {
+ stdio: 'pipe',
+ cwd: mcpRoot,
+ })
+ if (result.status !== 0) {
+ console.warn(`oxfmt failed:\n${result.stderr?.toString() ?? ''}${result.stdout?.toString() ?? ''}`)
+ }
}
// ------------------------------------------------------------------
@@ -262,5 +275,12 @@ console.log(`MCP Orval: ${outputDirs.length} module(s), ${totalEnabledOps} enabl
if (outputDirs.length > 0) {
const generatedFiles = outputDirs.map((d) => path.join(d, 'api.ts'))
- spawnSync(path.join(repoRoot, 'bin/hogli'), ['format:js', ...generatedFiles], { stdio: 'pipe', cwd: repoRoot })
+ formatGeneratedFiles(generatedFiles)
+ // Exported schemas become builder functions, so a pod holds no schema
+ // objects between calls (see lib/lazy-zod-schemas.mjs). Unused builders
+ // tree-shake without a @__PURE__ annotation.
+ for (const file of generatedFiles) {
+ const { source } = lazifyZodSchemas(fs.readFileSync(file, 'utf-8'), file)
+ fs.writeFileSync(file, source)
+ }
}
diff --git a/services/mcp/scripts/generate-tools.ts b/services/mcp/scripts/generate-tools.ts
index cc8d3e8d6478..b6fae8e076b2 100644
--- a/services/mcp/scripts/generate-tools.ts
+++ b/services/mcp/scripts/generate-tools.ts
@@ -400,6 +400,20 @@ function escapeForDescribe(desc: string): string {
return desc.trim().replace(/\\/g, '\\\\').replace(/'/g, "\\'").replace(/\n\s*/g, ' ')
}
+/**
+ * Emits a tool's input schema as a builder function. The Orval exports it uses are
+ * builders too (see generate-orval-schemas.mjs); each one is built once into a local
+ * of the same name, so the composed expression reads exactly as it did before.
+ */
+function buildSchemaBuilderDecl(schemaName: string, schemaExpr: string, orvalImports: string[]): string {
+ const used = [...new Set(orvalImports)].filter((name) => new RegExp(`\\b${name}\\b`).test(schemaExpr)).sort()
+ if (used.length === 0) {
+ return `const ${schemaName} = () => ${schemaExpr}`
+ }
+ const locals = used.map((name) => ` const ${name} = orvalSchemas.${name}()`).join('\n')
+ return `const ${schemaName} = () => {\n${locals}\n return ${schemaExpr}\n}`
+}
+
/**
* Parse enrich_url template into prefix, field, and source.
* '{id}' → { prefix: '', field: 'id', source: 'result' }
@@ -1074,7 +1088,7 @@ function generateToolCode(
schemaExpr = `z.preprocess(normalizeParamAliases(${aliasMapLiteral}), ${schemaExpr})`
}
- const schemaDecl = `const ${schemaName} = ${schemaExpr}`
+ const schemaDecl = buildSchemaBuilderDecl(schemaName, schemaExpr, composition.orvalImports)
const localVarParams = new Set(Object.keys(composition.paramFallbacks))
const pathExpr = buildPathExpr(resolved.path, composition.pathParamNames, 'params.', localVarParams)
@@ -1226,7 +1240,7 @@ function generateToolCode(
composition.pathParamNames.length > 0 ||
enrichUsesParams ||
!!selectableExtension
- const unusedParamsComment = paramsUsed ? '' : '// eslint-disable-next-line no-unused-vars\n'
+ const paramsName = paramsUsed ? 'params' : '_params'
// When `confirmed_action` is declared, emit TWO factories instead of
// one — `<name>-prepare` and `<name>-execute`. The prepare tool signs
@@ -1268,8 +1282,8 @@ function generateToolCode(
const toolBody = `{
name: '${toolName}',
- schema: ${schemaName},
- ${unusedParamsComment}handler: async (context: Context, params: z.infer<typeof ${schemaName}>) => {
+ schema: ${schemaName}(),
+ handler: async (context: Context, ${paramsName}: z.infer<ReturnType<typeof ${schemaName}>>) => {
${handlerBody} },
}`
@@ -1278,7 +1292,7 @@ ${handlerBody} },
const code = `
${schemaDecl}
-const ${factoryName} = (): ToolBase<typeof ${schemaName}, ${resultType}> => ${factoryBody}
+const ${factoryName} = (): ToolBase<ReturnType<typeof ${schemaName}>, ${resultType}> => ${factoryBody}
`
return {
@@ -1439,7 +1453,7 @@ ${prepareScopeField} })
// the signed, verified args under the same `params` name the generated
// request code expects.
const executeHandler = ` const __runtime = getConfirmedActionRuntime()
-${scopeResolveBlock} const __guard = await executeConfirmedAction<z.infer<typeof ${schemaName}>>(context, {
+${scopeResolveBlock} const __guard = await executeConfirmedAction<z.infer<ReturnType<typeof ${schemaName}>>>(context, {
incomingArgs: confirmationParams,
purpose: ${JSON.stringify(toolName)},
codec: __runtime.codec,
@@ -1454,8 +1468,8 @@ ${executeHandlerBody}`
const prepareBody = `{
name: '${prepareName}',
- schema: ${schemaName},
- handler: async (context: Context, params: z.infer<typeof ${schemaName}>) => {
+ schema: ${schemaName}(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ${schemaName}>>) => {
${prepareHandler} },
}`
@@ -1471,7 +1485,7 @@ ${schemaDecl}
${executeSchemaDecl}
-const ${prepareFactory} = (): ToolBase<typeof ${schemaName}, PrepareConfirmedActionResult> => (${prepareBody})
+const ${prepareFactory} = (): ToolBase<ReturnType<typeof ${schemaName}>, PrepareConfirmedActionResult> => (${prepareBody})
const ${executeFactory} = (): ToolBase<typeof ${executeSchemaName}, ${resultType}> => (${executeBody})
`
@@ -1518,7 +1532,7 @@ function generateCustomSchemaToolCode(
handlerBody += ` const projectId = await context.stateManager.getProjectId()\n`
}
- handlerBody += ` const parsedParams = ${schemaName}.parse(params)\n`
+ handlerBody += ` const parsedParams = ${schemaName}().parse(params)\n`
if (pathParamNames.length > 0) {
const destructured = pathParamNames.map((p) => `${p}, `).join('')
@@ -1576,12 +1590,12 @@ function generateCustomSchemaToolCode(
}
const code = `
-const ${schemaName} = ${baseSchemaExpr}
+const ${schemaName} = () => ${baseSchemaExpr}
-const ${factoryName} = (): ToolBase<typeof ${schemaName}, ${customResultType}> => ({
+const ${factoryName} = (): ToolBase<ReturnType<typeof ${schemaName}>, ${customResultType}> => ({
name: '${toolName}',
- schema: ${schemaName},
- handler: async (context: Context, params: z.infer<typeof ${schemaName}>) => {
+ schema: ${schemaName}(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ${schemaName}>>) => {
${handlerBody} },
})
`
@@ -1841,9 +1855,7 @@ function generateCategoryFile(
const mapEntries = [restMapEntries, wrapperMapEntries].filter(Boolean).join('\n')
const orvalImportLine =
- allOrvalImports.size > 0
- ? `\nimport { ${[...allOrvalImports].sort().join(', ')} } from '@/generated/${moduleName}/api'\n`
- : ''
+ allOrvalImports.size > 0 ? `\nimport * as orvalSchemas from '@/generated/${moduleName}/api'\n` : ''
const schemasImportLine = hasResponseType ? `\nimport type { Schemas } from '@/api/generated'\n` : ''
@@ -2377,7 +2389,13 @@ ${spreads}
...generatedModules.map((m) => path.join(GENERATED_DIR, `${m}.ts`)),
path.join(GENERATED_DIR, 'index.ts'),
]
- spawnSync(path.join(REPO_ROOT, 'bin/hogli'), ['format:js', ...generatedTsFiles], { stdio: 'pipe', cwd: REPO_ROOT })
+ const format = spawnSync(path.join(REPO_ROOT, 'bin/hogli'), ['format:js', ...generatedTsFiles], {
+ stdio: 'pipe',
+ cwd: REPO_ROOT,
+ })
+ if (format.status !== 0) {
+ console.warn(`hogli format:js failed:\n${format.stderr?.toString() ?? ''}${format.stdout?.toString() ?? ''}`)
+ }
spawnSync(path.join(REPO_ROOT, 'bin/hogli'), ['format:yaml', DEFINITIONS_JSON_PATH, ALL_DEFINITIONS_JSON_PATH], {
stdio: 'pipe',
cwd: REPO_ROOT,
diff --git a/services/mcp/scripts/lib/lazy-zod-schemas.mjs b/services/mcp/scripts/lib/lazy-zod-schemas.mjs
new file mode 100644
index 000000000000..92a160084471
--- /dev/null
+++ b/services/mcp/scripts/lib/lazy-zod-schemas.mjs
@@ -0,0 +1,105 @@
+/**
+ * Rewrites the Zod schemas Orval emits into builder functions.
+ *
+ * Orval writes `export const X = zod.object({...})`. Every such constant is a
+ * live object for the life of the process, and the MCP server ships ~2,800 of
+ * them: about 450 MiB of heap per pod at boot. As `export const X = () =>
+ * zod.object({...})` a schema exists only while a caller uses it, and building
+ * one costs ~0.1 ms. References between exported schemas become calls.
+ */
+import ts from 'typescript'
+
+/**
+ * @param {string} source Orval output for one module.
+ * @param {string} [fileName] Used for diagnostics only.
+ * @returns {{ source: string, schemaCount: number, referenceCount: number }}
+ */
+export function lazifyZodSchemas(source, fileName = 'api.ts') {
+ const sourceFile = ts.createSourceFile(fileName, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS)
+
+ const schemaDeclarations = []
+ for (const statement of sourceFile.statements) {
+ if (!ts.isVariableStatement(statement)) {
+ continue
+ }
+ const declarations = statement.declarationList.declarations
+ if (declarations.length !== 1) {
+ continue
+ }
+ const declaration = declarations[0]
+ if (!ts.isIdentifier(declaration.name) || !declaration.initializer) {
+ continue
+ }
+ if (isRootedAtZod(declaration.initializer)) {
+ schemaDeclarations.push(declaration)
+ }
+ }
+
+ const schemaNames = new Set(schemaDeclarations.map((declaration) => declaration.name.text))
+ /** @type {{ start: number, end: number, text: string }[]} */
+ const edits = []
+ let referenceCount = 0
+
+ for (const declaration of schemaDeclarations) {
+ const initializer = declaration.initializer
+ // The range between `=` and the initializer holds only trivia (spaces and
+ // any `@__PURE__` annotation); the builder replaces it.
+ edits.push({ start: initializer.getFullStart(), end: initializer.getStart(sourceFile), text: ' () => ' })
+
+ const visit = (node) => {
+ if (ts.isIdentifier(node) && schemaNames.has(node.text) && isValueReference(node)) {
+ referenceCount += 1
+ if (ts.isShorthandPropertyAssignment(node.parent)) {
+ edits.push({
+ start: node.getStart(sourceFile),
+ end: node.getEnd(),
+ text: `${node.text}: ${node.text}()`,
+ })
+ } else {
+ edits.push({ start: node.getStart(sourceFile), end: node.getEnd(), text: `${node.text}()` })
+ }
+ }
+ ts.forEachChild(node, visit)
+ }
+ ts.forEachChild(initializer, visit)
+ }
+
+ edits.sort((a, b) => b.start - a.start)
+ let output = source
+ let previousStart = Number.POSITIVE_INFINITY
+ for (const edit of edits) {
+ if (edit.end > previousStart) {
+ throw new Error(`${fileName}: overlapping edits while rewriting Zod schemas`)
+ }
+ output = output.slice(0, edit.start) + edit.text + output.slice(edit.end)
+ previousStart = edit.start
+ }
+
+ return { source: output, schemaCount: schemaDeclarations.length, referenceCount }
+}
+
+/** True for `zod.x(...)`, `zod.x(...).y(...)`, `zod\n .x(...)`; false for literals and for builders already rewritten. */
+function isRootedAtZod(expression) {
+ let node = expression
+ while (
+ ts.isPropertyAccessExpression(node) ||
+ ts.isCallExpression(node) ||
+ ts.isElementAccessExpression(node) ||
+ ts.isParenthesizedExpression(node)
+ ) {
+ node = node.expression
+ }
+ return ts.isIdentifier(node) && node.text === 'zod'
+}
+
+/** False when the identifier names a property (`a.X`, `{ X: ... }`) instead of reading a variable. */
+function isValueReference(identifier) {
+ const parent = identifier.parent
+ if (ts.isPropertyAccessExpression(parent) && parent.name === identifier) {
+ return false
+ }
+ if (ts.isPropertyAssignment(parent) && parent.name === identifier) {
+ return false
+ }
+ return true
+}
diff --git a/services/mcp/src/generated/actions/api.ts b/services/mcp/src/generated/actions/api.ts
index 0fa6973eb1d8..013d454e418c 100644
--- a/services/mcp/src/generated/actions/api.ts
+++ b/services/mcp/src/generated/actions/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const ActionsListParams = /* @__PURE__ */ zod.object({
+export const ActionsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,7 +16,7 @@ export const ActionsListParams = /* @__PURE__ */ zod.object({
),
})
-export const ActionsListQueryParams = /* @__PURE__ */ zod.object({
+export const ActionsListQueryParams = () => zod.object({
created_by: zod
.string()
.optional()
@@ -37,7 +37,7 @@ export const ActionsListQueryParams = /* @__PURE__ */ zod.object({
),
})
-export const ActionsCreateParams = /* @__PURE__ */ zod.object({
+export const ActionsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -45,7 +45,7 @@ export const ActionsCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const ActionsCreateQueryParams = /* @__PURE__ */ zod.object({
+export const ActionsCreateQueryParams = () => zod.object({
format: zod.enum(['csv', 'json']).optional(),
})
@@ -63,7 +63,7 @@ export const actionsCreateBodyStepsItemPropertiesItemFourTypeDefault = `event`
export const actionsCreateBodyStepsItemPropertiesItemFourOperatorDefault = `is_date_exact`
export const actionsCreateBodyStepsItemPropertiesItemFiveTypeDefault = `event`
-export const ActionsCreateBody = /* @__PURE__ */ zod
+export const ActionsCreateBody = () => zod
.object({
name: zod
.string()
@@ -470,7 +470,7 @@ export const ActionsCreateBody = /* @__PURE__ */ zod
})
.describe('Serializer mixin that handles tags for objects.')
-export const ActionsRetrieveParams = /* @__PURE__ */ zod.object({
+export const ActionsRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this action.'),
project_id: zod
.string()
@@ -479,11 +479,11 @@ export const ActionsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const ActionsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const ActionsRetrieveQueryParams = () => zod.object({
format: zod.enum(['csv', 'json']).optional(),
})
-export const ActionsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const ActionsPartialUpdateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this action.'),
project_id: zod
.string()
@@ -492,7 +492,7 @@ export const ActionsPartialUpdateParams = /* @__PURE__ */ zod.object({
),
})
-export const ActionsPartialUpdateQueryParams = /* @__PURE__ */ zod.object({
+export const ActionsPartialUpdateQueryParams = () => zod.object({
format: zod.enum(['csv', 'json']).optional(),
})
@@ -510,7 +510,7 @@ export const actionsPartialUpdateBodyStepsItemPropertiesItemFourTypeDefault = `e
export const actionsPartialUpdateBodyStepsItemPropertiesItemFourOperatorDefault = `is_date_exact`
export const actionsPartialUpdateBodyStepsItemPropertiesItemFiveTypeDefault = `event`
-export const ActionsPartialUpdateBody = /* @__PURE__ */ zod
+export const ActionsPartialUpdateBody = () => zod
.object({
name: zod
.string()
@@ -922,7 +922,7 @@ export const ActionsPartialUpdateBody = /* @__PURE__ */ zod
/**
* Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
*/
-export const ActionsDestroyParams = /* @__PURE__ */ zod.object({
+export const ActionsDestroyParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this action.'),
project_id: zod
.string()
@@ -931,6 +931,6 @@ export const ActionsDestroyParams = /* @__PURE__ */ zod.object({
),
})
-export const ActionsDestroyQueryParams = /* @__PURE__ */ zod.object({
+export const ActionsDestroyQueryParams = () => zod.object({
format: zod.enum(['csv', 'json']).optional(),
})
diff --git a/services/mcp/src/generated/activity_logs/api.ts b/services/mcp/src/generated/activity_logs/api.ts
index b3eeaa35d5b8..62ae8195dc74 100644
--- a/services/mcp/src/generated/activity_logs/api.ts
+++ b/services/mcp/src/generated/activity_logs/api.ts
@@ -8,163 +8,165 @@
*/
import * as zod from 'zod'
-export const ActivityLogListParams = /* @__PURE__ */ zod.object({
- project_id: zod
- .string()
- .describe(
- "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/."
- ),
-})
+export const ActivityLogListParams = () =>
+ zod.object({
+ project_id: zod
+ .string()
+ .describe(
+ "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/."
+ ),
+ })
export const activityLogListQueryPageSizeDefault = 100
export const activityLogListQueryPageSizeMax = 1000
-export const ActivityLogListQueryParams = /* @__PURE__ */ zod.object({
- item_id: zod.string().min(1).optional().describe('Filter by the ID of the affected resource.'),
- page: zod
- .number()
- .min(1)
- .optional()
- .describe(
- 'Page number for pagination. When provided, uses page-based pagination ordered by most recent first.'
- ),
- page_size: zod
- .number()
- .min(1)
- .max(activityLogListQueryPageSizeMax)
- .default(activityLogListQueryPageSizeDefault)
- .describe('Number of results per page (default: 100, max: 1000). Only used with page-based pagination.'),
- scope: zod
- .enum([
- 'Cohort',
- 'FeatureFlag',
- 'Person',
- 'Group',
- 'Insight',
- 'Plugin',
- 'PluginConfig',
- 'HogFunction',
- 'HogFlow',
- 'DataManagement',
- 'EventDefinition',
- 'PropertyDefinition',
- 'Notebook',
- 'Endpoint',
- 'EndpointVersion',
- 'Dashboard',
- 'Replay',
- 'Experiment',
- 'ExperimentHoldout',
- 'ExperimentSavedMetric',
- 'Survey',
- 'EarlyAccessFeature',
- 'SessionRecordingPlaylist',
- 'Comment',
- 'Team',
- 'Project',
- 'ErrorTrackingIssue',
- 'DataWarehouseSavedQuery',
- 'Organization',
- 'OrganizationDomain',
- 'OrganizationMembership',
- 'Role',
- 'UserGroup',
- 'BatchExport',
- 'BatchImport',
- 'Integration',
- 'Annotation',
- 'Tag',
- 'TaggedItem',
- 'Subscription',
- 'PersonalAPIKey',
- 'ProjectSecretAPIKey',
- 'User',
- 'Action',
- 'AlertConfiguration',
- 'Threshold',
- 'AlertSubscription',
- 'ExternalDataSource',
- 'ExternalDataSchema',
- 'LLMTrace',
- 'WebAnalyticsFilterPreset',
- 'CustomerProfileConfig',
- 'Log',
- 'LogsAlertConfiguration',
- 'ProductTour',
- 'Ticket',
- ])
- .optional()
- .describe(
- 'Filter by a single activity scope, e.g. "FeatureFlag", "Insight", "Dashboard", "Experiment".\n\n* `Cohort` - Cohort\n* `FeatureFlag` - FeatureFlag\n* `Person` - Person\n* `Group` - Group\n* `Insight` - Insight\n* `Plugin` - Plugin\n* `PluginConfig` - PluginConfig\n* `HogFunction` - HogFunction\n* `HogFlow` - HogFlow\n* `DataManagement` - DataManagement\n* `EventDefinition` - EventDefinition\n* `PropertyDefinition` - PropertyDefinition\n* `Notebook` - Notebook\n* `Endpoint` - Endpoint\n* `EndpointVersion` - EndpointVersion\n* `Dashboard` - Dashboard\n* `Replay` - Replay\n* `Experiment` - Experiment\n* `ExperimentHoldout` - ExperimentHoldout\n* `ExperimentSavedMetric` - ExperimentSavedMetric\n* `Survey` - Survey\n* `EarlyAccessFeature` - EarlyAccessFeature\n* `SessionRecordingPlaylist` - SessionRecordingPlaylist\n* `Comment` - Comment\n* `Team` - Team\n* `Project` - Project\n* `ErrorTrackingIssue` - ErrorTrackingIssue\n* `DataWarehouseSavedQuery` - DataWarehouseSavedQuery\n* `Organization` - Organization\n* `OrganizationDomain` - OrganizationDomain\n* `OrganizationMembership` - OrganizationMembership\n* `Role` - Role\n* `UserGroup` - UserGroup\n* `BatchExport` - BatchExport\n* `BatchImport` - BatchImport\n* `Integration` - Integration\n* `Annotation` - Annotation\n* `Tag` - Tag\n* `TaggedItem` - TaggedItem\n* `Subscription` - Subscription\n* `PersonalAPIKey` - PersonalAPIKey\n* `ProjectSecretAPIKey` - ProjectSecretAPIKey\n* `User` - User\n* `Action` - Action\n* `AlertConfiguration` - AlertConfiguration\n* `Threshold` - Threshold\n* `AlertSubscription` - AlertSubscription\n* `ExternalDataSource` - ExternalDataSource\n* `ExternalDataSchema` - ExternalDataSchema\n* `LLMTrace` - LLMTrace\n* `WebAnalyticsFilterPreset` - WebAnalyticsFilterPreset\n* `CustomerProfileConfig` - CustomerProfileConfig\n* `Log` - Log\n* `LogsAlertConfiguration` - LogsAlertConfiguration\n* `ProductTour` - ProductTour\n* `Ticket` - Ticket'
- ),
- scopes: zod
- .array(
- zod
- .enum([
- 'Cohort',
- 'FeatureFlag',
- 'Person',
- 'Group',
- 'Insight',
- 'Plugin',
- 'PluginConfig',
- 'HogFunction',
- 'HogFlow',
- 'DataManagement',
- 'EventDefinition',
- 'PropertyDefinition',
- 'Notebook',
- 'Endpoint',
- 'EndpointVersion',
- 'Dashboard',
- 'Replay',
- 'Experiment',
- 'ExperimentHoldout',
- 'ExperimentSavedMetric',
- 'Survey',
- 'EarlyAccessFeature',
- 'SessionRecordingPlaylist',
- 'Comment',
- 'Team',
- 'Project',
- 'ErrorTrackingIssue',
- 'DataWarehouseSavedQuery',
- 'Organization',
- 'OrganizationDomain',
- 'OrganizationMembership',
- 'Role',
- 'UserGroup',
- 'BatchExport',
- 'BatchImport',
- 'Integration',
- 'Annotation',
- 'Tag',
- 'TaggedItem',
- 'Subscription',
- 'PersonalAPIKey',
- 'ProjectSecretAPIKey',
- 'User',
- 'Action',
- 'AlertConfiguration',
- 'Threshold',
- 'AlertSubscription',
- 'ExternalDataSource',
- 'ExternalDataSchema',
- 'LLMTrace',
- 'WebAnalyticsFilterPreset',
- 'CustomerProfileConfig',
- 'Log',
- 'LogsAlertConfiguration',
- 'ProductTour',
- 'Ticket',
- ])
- .describe(
- '* `Cohort` - Cohort\n* `FeatureFlag` - FeatureFlag\n* `Person` - Person\n* `Group` - Group\n* `Insight` - Insight\n* `Plugin` - Plugin\n* `PluginConfig` - PluginConfig\n* `HogFunction` - HogFunction\n* `HogFlow` - HogFlow\n* `DataManagement` - DataManagement\n* `EventDefinition` - EventDefinition\n* `PropertyDefinition` - PropertyDefinition\n* `Notebook` - Notebook\n* `Endpoint` - Endpoint\n* `EndpointVersion` - EndpointVersion\n* `Dashboard` - Dashboard\n* `Replay` - Replay\n* `Experiment` - Experiment\n* `ExperimentHoldout` - ExperimentHoldout\n* `ExperimentSavedMetric` - ExperimentSavedMetric\n* `Survey` - Survey\n* `EarlyAccessFeature` - EarlyAccessFeature\n* `SessionRecordingPlaylist` - SessionRecordingPlaylist\n* `Comment` - Comment\n* `Team` - Team\n* `Project` - Project\n* `ErrorTrackingIssue` - ErrorTrackingIssue\n* `DataWarehouseSavedQuery` - DataWarehouseSavedQuery\n* `Organization` - Organization\n* `OrganizationDomain` - OrganizationDomain\n* `OrganizationMembership` - OrganizationMembership\n* `Role` - Role\n* `UserGroup` - UserGroup\n* `BatchExport` - BatchExport\n* `BatchImport` - BatchImport\n* `Integration` - Integration\n* `Annotation` - Annotation\n* `Tag` - Tag\n* `TaggedItem` - TaggedItem\n* `Subscription` - Subscription\n* `PersonalAPIKey` - PersonalAPIKey\n* `ProjectSecretAPIKey` - ProjectSecretAPIKey\n* `User` - User\n* `Action` - Action\n* `AlertConfiguration` - AlertConfiguration\n* `Threshold` - Threshold\n* `AlertSubscription` - AlertSubscription\n* `ExternalDataSource` - ExternalDataSource\n* `ExternalDataSchema` - ExternalDataSchema\n* `LLMTrace` - LLMTrace\n* `WebAnalyticsFilterPreset` - WebAnalyticsFilterPreset\n* `CustomerProfileConfig` - CustomerProfileConfig\n* `Log` - Log\n* `LogsAlertConfiguration` - LogsAlertConfiguration\n* `ProductTour` - ProductTour\n* `Ticket` - Ticket'
- )
- )
- .optional()
- .describe(
- 'Filter by multiple activity scopes, comma-separated. Values must be valid ActivityScope enum values. E.g. "FeatureFlag,Insight".'
- ),
- user: zod.string().optional().describe('Filter by user UUID who performed the action.'),
-})
+export const ActivityLogListQueryParams = () =>
+ zod.object({
+ item_id: zod.string().min(1).optional().describe('Filter by the ID of the affected resource.'),
+ page: zod
+ .number()
+ .min(1)
+ .optional()
+ .describe(
+ 'Page number for pagination. When provided, uses page-based pagination ordered by most recent first.'
+ ),
+ page_size: zod
+ .number()
+ .min(1)
+ .max(activityLogListQueryPageSizeMax)
+ .default(activityLogListQueryPageSizeDefault)
+ .describe('Number of results per page (default: 100, max: 1000). Only used with page-based pagination.'),
+ scope: zod
+ .enum([
+ 'Cohort',
+ 'FeatureFlag',
+ 'Person',
+ 'Group',
+ 'Insight',
+ 'Plugin',
+ 'PluginConfig',
+ 'HogFunction',
+ 'HogFlow',
+ 'DataManagement',
+ 'EventDefinition',
+ 'PropertyDefinition',
+ 'Notebook',
+ 'Endpoint',
+ 'EndpointVersion',
+ 'Dashboard',
+ 'Replay',
+ 'Experiment',
+ 'ExperimentHoldout',
+ 'ExperimentSavedMetric',
+ 'Survey',
+ 'EarlyAccessFeature',
+ 'SessionRecordingPlaylist',
+ 'Comment',
+ 'Team',
+ 'Project',
+ 'ErrorTrackingIssue',
+ 'DataWarehouseSavedQuery',
+ 'Organization',
+ 'OrganizationDomain',
+ 'OrganizationMembership',
+ 'Role',
+ 'UserGroup',
+ 'BatchExport',
+ 'BatchImport',
+ 'Integration',
+ 'Annotation',
+ 'Tag',
+ 'TaggedItem',
+ 'Subscription',
+ 'PersonalAPIKey',
+ 'ProjectSecretAPIKey',
+ 'User',
+ 'Action',
+ 'AlertConfiguration',
+ 'Threshold',
+ 'AlertSubscription',
+ 'ExternalDataSource',
+ 'ExternalDataSchema',
+ 'LLMTrace',
+ 'WebAnalyticsFilterPreset',
+ 'CustomerProfileConfig',
+ 'Log',
+ 'LogsAlertConfiguration',
+ 'ProductTour',
+ 'Ticket',
+ ])
+ .optional()
+ .describe(
+ 'Filter by a single activity scope, e.g. "FeatureFlag", "Insight", "Dashboard", "Experiment".\n\n* `Cohort` - Cohort\n* `FeatureFlag` - FeatureFlag\n* `Person` - Person\n* `Group` - Group\n* `Insight` - Insight\n* `Plugin` - Plugin\n* `PluginConfig` - PluginConfig\n* `HogFunction` - HogFunction\n* `HogFlow` - HogFlow\n* `DataManagement` - DataManagement\n* `EventDefinition` - EventDefinition\n* `PropertyDefinition` - PropertyDefinition\n* `Notebook` - Notebook\n* `Endpoint` - Endpoint\n* `EndpointVersion` - EndpointVersion\n* `Dashboard` - Dashboard\n* `Replay` - Replay\n* `Experiment` - Experiment\n* `ExperimentHoldout` - ExperimentHoldout\n* `ExperimentSavedMetric` - ExperimentSavedMetric\n* `Survey` - Survey\n* `EarlyAccessFeature` - EarlyAccessFeature\n* `SessionRecordingPlaylist` - SessionRecordingPlaylist\n* `Comment` - Comment\n* `Team` - Team\n* `Project` - Project\n* `ErrorTrackingIssue` - ErrorTrackingIssue\n* `DataWarehouseSavedQuery` - DataWarehouseSavedQuery\n* `Organization` - Organization\n* `OrganizationDomain` - OrganizationDomain\n* `OrganizationMembership` - OrganizationMembership\n* `Role` - Role\n* `UserGroup` - UserGroup\n* `BatchExport` - BatchExport\n* `BatchImport` - BatchImport\n* `Integration` - Integration\n* `Annotation` - Annotation\n* `Tag` - Tag\n* `TaggedItem` - TaggedItem\n* `Subscription` - Subscription\n* `PersonalAPIKey` - PersonalAPIKey\n* `ProjectSecretAPIKey` - ProjectSecretAPIKey\n* `User` - User\n* `Action` - Action\n* `AlertConfiguration` - AlertConfiguration\n* `Threshold` - Threshold\n* `AlertSubscription` - AlertSubscription\n* `ExternalDataSource` - ExternalDataSource\n* `ExternalDataSchema` - ExternalDataSchema\n* `LLMTrace` - LLMTrace\n* `WebAnalyticsFilterPreset` - WebAnalyticsFilterPreset\n* `CustomerProfileConfig` - CustomerProfileConfig\n* `Log` - Log\n* `LogsAlertConfiguration` - LogsAlertConfiguration\n* `ProductTour` - ProductTour\n* `Ticket` - Ticket'
+ ),
+ scopes: zod
+ .array(
+ zod
+ .enum([
+ 'Cohort',
+ 'FeatureFlag',
+ 'Person',
+ 'Group',
+ 'Insight',
+ 'Plugin',
+ 'PluginConfig',
+ 'HogFunction',
+ 'HogFlow',
+ 'DataManagement',
+ 'EventDefinition',
+ 'PropertyDefinition',
+ 'Notebook',
+ 'Endpoint',
+ 'EndpointVersion',
+ 'Dashboard',
+ 'Replay',
+ 'Experiment',
+ 'ExperimentHoldout',
+ 'ExperimentSavedMetric',
+ 'Survey',
+ 'EarlyAccessFeature',
+ 'SessionRecordingPlaylist',
+ 'Comment',
+ 'Team',
+ 'Project',
+ 'ErrorTrackingIssue',
+ 'DataWarehouseSavedQuery',
+ 'Organization',
+ 'OrganizationDomain',
+ 'OrganizationMembership',
+ 'Role',
+ 'UserGroup',
+ 'BatchExport',
+ 'BatchImport',
+ 'Integration',
+ 'Annotation',
+ 'Tag',
+ 'TaggedItem',
+ 'Subscription',
+ 'PersonalAPIKey',
+ 'ProjectSecretAPIKey',
+ 'User',
+ 'Action',
+ 'AlertConfiguration',
+ 'Threshold',
+ 'AlertSubscription',
+ 'ExternalDataSource',
+ 'ExternalDataSchema',
+ 'LLMTrace',
+ 'WebAnalyticsFilterPreset',
+ 'CustomerProfileConfig',
+ 'Log',
+ 'LogsAlertConfiguration',
+ 'ProductTour',
+ 'Ticket',
+ ])
+ .describe(
+ '* `Cohort` - Cohort\n* `FeatureFlag` - FeatureFlag\n* `Person` - Person\n* `Group` - Group\n* `Insight` - Insight\n* `Plugin` - Plugin\n* `PluginConfig` - PluginConfig\n* `HogFunction` - HogFunction\n* `HogFlow` - HogFlow\n* `DataManagement` - DataManagement\n* `EventDefinition` - EventDefinition\n* `PropertyDefinition` - PropertyDefinition\n* `Notebook` - Notebook\n* `Endpoint` - Endpoint\n* `EndpointVersion` - EndpointVersion\n* `Dashboard` - Dashboard\n* `Replay` - Replay\n* `Experiment` - Experiment\n* `ExperimentHoldout` - ExperimentHoldout\n* `ExperimentSavedMetric` - ExperimentSavedMetric\n* `Survey` - Survey\n* `EarlyAccessFeature` - EarlyAccessFeature\n* `SessionRecordingPlaylist` - SessionRecordingPlaylist\n* `Comment` - Comment\n* `Team` - Team\n* `Project` - Project\n* `ErrorTrackingIssue` - ErrorTrackingIssue\n* `DataWarehouseSavedQuery` - DataWarehouseSavedQuery\n* `Organization` - Organization\n* `OrganizationDomain` - OrganizationDomain\n* `OrganizationMembership` - OrganizationMembership\n* `Role` - Role\n* `UserGroup` - UserGroup\n* `BatchExport` - BatchExport\n* `BatchImport` - BatchImport\n* `Integration` - Integration\n* `Annotation` - Annotation\n* `Tag` - Tag\n* `TaggedItem` - TaggedItem\n* `Subscription` - Subscription\n* `PersonalAPIKey` - PersonalAPIKey\n* `ProjectSecretAPIKey` - ProjectSecretAPIKey\n* `User` - User\n* `Action` - Action\n* `AlertConfiguration` - AlertConfiguration\n* `Threshold` - Threshold\n* `AlertSubscription` - AlertSubscription\n* `ExternalDataSource` - ExternalDataSource\n* `ExternalDataSchema` - ExternalDataSchema\n* `LLMTrace` - LLMTrace\n* `WebAnalyticsFilterPreset` - WebAnalyticsFilterPreset\n* `CustomerProfileConfig` - CustomerProfileConfig\n* `Log` - Log\n* `LogsAlertConfiguration` - LogsAlertConfiguration\n* `ProductTour` - ProductTour\n* `Ticket` - Ticket'
+ )
+ )
+ .optional()
+ .describe(
+ 'Filter by multiple activity scopes, comma-separated. Values must be valid ActivityScope enum values. E.g. "FeatureFlag,Insight".'
+ ),
+ user: zod.string().optional().describe('Filter by user UUID who performed the action.'),
+ })
diff --git a/services/mcp/src/generated/ai_observability/api.ts b/services/mcp/src/generated/ai_observability/api.ts
index 7bc393a1aff8..d2efdc61f936 100644
--- a/services/mcp/src/generated/ai_observability/api.ts
+++ b/services/mcp/src/generated/ai_observability/api.ts
@@ -23,7 +23,7 @@ export const llmAnalyticsPersonalSpendListQueryProductMax = 64
export const llmAnalyticsPersonalSpendListQueryRefreshDefault = false
-export const LlmAnalyticsPersonalSpendListQueryParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsPersonalSpendListQueryParams = () => zod.object({
bucket_minutes: zod
.union([zod.literal(5), zod.literal(15), zod.literal(30), zod.literal(60)])
.optional()
@@ -67,7 +67,7 @@ export const LlmAnalyticsPersonalSpendListQueryParams = /* @__PURE__ */ zod.obje
/**
* List a dataset's current items or its exact contents at a prior revision.
*/
-export const DatasetItemsListParams = /* @__PURE__ */ zod.object({
+export const DatasetItemsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -77,7 +77,7 @@ export const DatasetItemsListParams = /* @__PURE__ */ zod.object({
export const datasetItemsListQueryArchivedDefault = false
-export const DatasetItemsListQueryParams = /* @__PURE__ */ zod.object({
+export const DatasetItemsListQueryParams = () => zod.object({
archived: zod
.boolean()
.default(datasetItemsListQueryArchivedDefault)
@@ -91,7 +91,7 @@ export const DatasetItemsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Create an item and its first immutable version. An identical client item ID retry returns the existing item. A different payload or an archived match returns a conflict.
*/
-export const DatasetItemsCreateParams = /* @__PURE__ */ zod.object({
+export const DatasetItemsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -105,7 +105,7 @@ export const datasetItemsCreateBodySourceTraceIdMax = 255
export const datasetItemsCreateBodySourceEventIdMax = 255
-export const DatasetItemsCreateBody = /* @__PURE__ */ zod.object({
+export const DatasetItemsCreateBody = () => zod.object({
dataset: zod.string().describe('Dataset that will own the item.'),
client_item_id: zod
.string()
@@ -167,7 +167,7 @@ export const DatasetItemsCreateBody = /* @__PURE__ */ zod.object({
/**
* Retrieve the current item version or the version visible at an exact dataset revision.
*/
-export const DatasetItemsRetrieveParams = /* @__PURE__ */ zod.object({
+export const DatasetItemsRetrieveParams = () => zod.object({
dataset_item_id: zod.string(),
project_id: zod
.string()
@@ -176,14 +176,14 @@ export const DatasetItemsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const DatasetItemsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const DatasetItemsRetrieveQueryParams = () => zod.object({
revision: zod.number().min(1).optional().describe('Return the item as it appeared at this exact dataset revision.'),
})
/**
* Create a new immutable item version from editable fields.
*/
-export const DatasetItemsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const DatasetItemsPartialUpdateParams = () => zod.object({
dataset_item_id: zod.string(),
project_id: zod
.string()
@@ -192,7 +192,7 @@ export const DatasetItemsPartialUpdateParams = /* @__PURE__ */ zod.object({
),
})
-export const DatasetItemsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const DatasetItemsPartialUpdateBody = () => zod.object({
base_version: zod.number().min(1).describe('Current item version observed by the caller.'),
input: zod
.union([
@@ -224,7 +224,7 @@ export const DatasetItemsPartialUpdateBody = /* @__PURE__ */ zod.object({
/**
* Archive an active item by creating a new immutable version.
*/
-export const DatasetItemsArchiveParams = /* @__PURE__ */ zod.object({
+export const DatasetItemsArchiveParams = () => zod.object({
dataset_item_id: zod.string(),
project_id: zod
.string()
@@ -233,14 +233,14 @@ export const DatasetItemsArchiveParams = /* @__PURE__ */ zod.object({
),
})
-export const DatasetItemsArchiveBody = /* @__PURE__ */ zod.object({
+export const DatasetItemsArchiveBody = () => zod.object({
base_version: zod.number().min(1).describe('Current item version observed by the caller.'),
})
/**
* Restore an archived item by copying content into a new immutable version.
*/
-export const DatasetItemsRestoreParams = /* @__PURE__ */ zod.object({
+export const DatasetItemsRestoreParams = () => zod.object({
dataset_item_id: zod.string(),
project_id: zod
.string()
@@ -249,7 +249,7 @@ export const DatasetItemsRestoreParams = /* @__PURE__ */ zod.object({
),
})
-export const DatasetItemsRestoreBody = /* @__PURE__ */ zod.object({
+export const DatasetItemsRestoreBody = () => zod.object({
base_version: zod.number().min(1).describe('Current item version observed by the caller.'),
source_version: zod
.number()
@@ -261,7 +261,7 @@ export const DatasetItemsRestoreBody = /* @__PURE__ */ zod.object({
/**
* List every immutable version of an item, newest first.
*/
-export const DatasetItemsVersionsListParams = /* @__PURE__ */ zod.object({
+export const DatasetItemsVersionsListParams = () => zod.object({
dataset_item_id: zod.string(),
project_id: zod
.string()
@@ -270,7 +270,7 @@ export const DatasetItemsVersionsListParams = /* @__PURE__ */ zod.object({
),
})
-export const DatasetItemsVersionsListQueryParams = /* @__PURE__ */ zod.object({
+export const DatasetItemsVersionsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
@@ -278,7 +278,7 @@ export const DatasetItemsVersionsListQueryParams = /* @__PURE__ */ zod.object({
/**
* List active datasets by default, or archived datasets when requested.
*/
-export const DatasetsListParams = /* @__PURE__ */ zod.object({
+export const DatasetsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -291,7 +291,7 @@ export const datasetsListQueryIdInMax = 100
export const datasetsListQueryOrderByDefault = `-created_at`
-export const DatasetsListQueryParams = /* @__PURE__ */ zod.object({
+export const DatasetsListQueryParams = () => zod.object({
archived: zod
.boolean()
.default(datasetsListQueryArchivedDefault)
@@ -317,7 +317,7 @@ export const DatasetsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Create an empty dataset. Its first revision is created with its first item.
*/
-export const DatasetsCreateParams = /* @__PURE__ */ zod.object({
+export const DatasetsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -330,7 +330,7 @@ export const datasetsCreateBodyNameMax = 400
export const datasetsCreateBodyDescriptionDefault = ``
export const datasetsCreateBodyDescriptionMax = 10000
-export const DatasetsCreateBody = /* @__PURE__ */ zod.object({
+export const DatasetsCreateBody = () => zod.object({
name: zod.string().max(datasetsCreateBodyNameMax).describe('Dataset name. Names are unique within a project.'),
description: zod
.string()
@@ -346,7 +346,7 @@ export const DatasetsCreateBody = /* @__PURE__ */ zod.object({
/**
* Retrieve an active or archived dataset.
*/
-export const DatasetsRetrieveParams = /* @__PURE__ */ zod.object({
+export const DatasetsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this dataset.'),
project_id: zod
.string()
@@ -358,7 +358,7 @@ export const DatasetsRetrieveParams = /* @__PURE__ */ zod.object({
/**
* Update descriptive dataset fields without changing its revision.
*/
-export const DatasetsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const DatasetsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this dataset.'),
project_id: zod
.string()
@@ -371,7 +371,7 @@ export const datasetsPartialUpdateBodyNameMax = 400
export const datasetsPartialUpdateBodyDescriptionMax = 10000
-export const DatasetsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const DatasetsPartialUpdateBody = () => zod.object({
name: zod
.string()
.max(datasetsPartialUpdateBodyNameMax)
@@ -391,7 +391,7 @@ export const DatasetsPartialUpdateBody = /* @__PURE__ */ zod.object({
/**
* Archive a dataset. Archived datasets remain readable and reject item mutations.
*/
-export const DatasetsArchiveParams = /* @__PURE__ */ zod.object({
+export const DatasetsArchiveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this dataset.'),
project_id: zod
.string()
@@ -403,7 +403,7 @@ export const DatasetsArchiveParams = /* @__PURE__ */ zod.object({
/**
* Restore an archived dataset without changing its item states.
*/
-export const DatasetsRestoreParams = /* @__PURE__ */ zod.object({
+export const DatasetsRestoreParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this dataset.'),
project_id: zod
.string()
@@ -415,7 +415,7 @@ export const DatasetsRestoreParams = /* @__PURE__ */ zod.object({
/**
* List immutable dataset revisions, newest first.
*/
-export const DatasetsRevisionsListParams = /* @__PURE__ */ zod.object({
+export const DatasetsRevisionsListParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this dataset.'),
project_id: zod
.string()
@@ -424,12 +424,12 @@ export const DatasetsRevisionsListParams = /* @__PURE__ */ zod.object({
),
})
-export const DatasetsRevisionsListQueryParams = /* @__PURE__ */ zod.object({
+export const DatasetsRevisionsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const EvaluationDirectoriesListParams = /* @__PURE__ */ zod.object({
+export const EvaluationDirectoriesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -437,7 +437,7 @@ export const EvaluationDirectoriesListParams = /* @__PURE__ */ zod.object({
),
})
-export const EvaluationDirectoriesCreateParams = /* @__PURE__ */ zod.object({
+export const EvaluationDirectoriesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -447,14 +447,14 @@ export const EvaluationDirectoriesCreateParams = /* @__PURE__ */ zod.object({
export const evaluationDirectoriesCreateBodyNameMax = 400
-export const EvaluationDirectoriesCreateBody = /* @__PURE__ */ zod.object({
+export const EvaluationDirectoriesCreateBody = () => zod.object({
name: zod
.string()
.max(evaluationDirectoriesCreateBodyNameMax)
.describe('Directory name shown in the online evals list.'),
})
-export const EvaluationDirectoriesRetrieveParams = /* @__PURE__ */ zod.object({
+export const EvaluationDirectoriesRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this evaluation directory.'),
project_id: zod
.string()
@@ -463,7 +463,7 @@ export const EvaluationDirectoriesRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const EvaluationDirectoriesPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const EvaluationDirectoriesPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this evaluation directory.'),
project_id: zod
.string()
@@ -474,7 +474,7 @@ export const EvaluationDirectoriesPartialUpdateParams = /* @__PURE__ */ zod.obje
export const evaluationDirectoriesPartialUpdateBodyNameMax = 400
-export const EvaluationDirectoriesPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const EvaluationDirectoriesPartialUpdateBody = () => zod.object({
name: zod
.string()
.max(evaluationDirectoriesPartialUpdateBodyNameMax)
@@ -482,7 +482,7 @@ export const EvaluationDirectoriesPartialUpdateBody = /* @__PURE__ */ zod.object
.describe('Directory name shown in the online evals list.'),
})
-export const EvaluationDirectoriesDestroyParams = /* @__PURE__ */ zod.object({
+export const EvaluationDirectoriesDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this evaluation directory.'),
project_id: zod
.string()
@@ -497,7 +497,7 @@ export const EvaluationDirectoriesDestroyParams = /* @__PURE__ */ zod.object({
* This endpoint validates the request and enqueues a Temporal workflow
* to asynchronously execute the evaluation.
*/
-export const EvaluationRunsCreateParams = /* @__PURE__ */ zod.object({
+export const EvaluationRunsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -507,7 +507,7 @@ export const EvaluationRunsCreateParams = /* @__PURE__ */ zod.object({
export const evaluationRunsCreateBodyEventDefault = `$ai_generation`
-export const EvaluationRunsCreateBody = /* @__PURE__ */ zod.object({
+export const EvaluationRunsCreateBody = () => zod.object({
evaluation_id: zod.string().describe('UUID of the evaluation to run.'),
target_event_id: zod.string().describe('UUID of the $ai_generation event to evaluate.'),
timestamp: zod.iso
@@ -520,7 +520,7 @@ export const EvaluationRunsCreateBody = /* @__PURE__ */ zod.object({
distinct_id: zod.string().nullish().describe('Distinct ID of the event (optional, improves lookup performance).'),
})
-export const EvaluationsListParams = /* @__PURE__ */ zod.object({
+export const EvaluationsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -528,7 +528,7 @@ export const EvaluationsListParams = /* @__PURE__ */ zod.object({
),
})
-export const EvaluationsListQueryParams = /* @__PURE__ */ zod.object({
+export const EvaluationsListQueryParams = () => zod.object({
directory_id: zod.string().optional().describe('Filter evaluations by directory UUID.'),
directory_id__isnull: zod.boolean().optional().describe('Filter evaluations by whether they are at the top level.'),
enabled: zod.boolean().optional().describe('Filter by enabled status'),
@@ -550,7 +550,7 @@ export const EvaluationsListQueryParams = /* @__PURE__ */ zod.object({
search: zod.string().optional().describe('Search in name or description'),
})
-export const EvaluationsCreateParams = /* @__PURE__ */ zod.object({
+export const EvaluationsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -579,7 +579,7 @@ export const evaluationsCreateBodyTargetConfigTwoMaxAgeSecondsMax = 604800
export const evaluationsCreateBodyModelConfigurationOneModelMax = 100
-export const EvaluationsCreateBody = /* @__PURE__ */ zod
+export const EvaluationsCreateBody = () => zod
.object({
name: zod.string().max(evaluationsCreateBodyNameMax).describe('Name of the evaluation.'),
description: zod.string().optional().describe('Optional description of what this evaluation checks.'),
@@ -755,7 +755,7 @@ export const EvaluationsCreateBody = /* @__PURE__ */ zod
})
.describe('An evaluation that scores LLM generations, traces, or sessions.')
-export const EvaluationsRetrieveParams = /* @__PURE__ */ zod.object({
+export const EvaluationsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this evaluation.'),
project_id: zod
.string()
@@ -764,7 +764,7 @@ export const EvaluationsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const EvaluationsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const EvaluationsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this evaluation.'),
project_id: zod
.string()
@@ -794,7 +794,7 @@ export const evaluationsPartialUpdateBodyTargetConfigTwoMaxAgeSecondsMax = 60480
export const evaluationsPartialUpdateBodyModelConfigurationOneModelMax = 100
-export const EvaluationsPartialUpdateBody = /* @__PURE__ */ zod
+export const EvaluationsPartialUpdateBody = () => zod
.object({
name: zod.string().max(evaluationsPartialUpdateBodyNameMax).optional().describe('Name of the evaluation.'),
description: zod.string().optional().describe('Optional description of what this evaluation checks.'),
@@ -975,7 +975,7 @@ export const EvaluationsPartialUpdateBody = /* @__PURE__ */ zod
/**
* Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
*/
-export const EvaluationsDestroyParams = /* @__PURE__ */ zod.object({
+export const EvaluationsDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this evaluation.'),
project_id: zod
.string()
@@ -987,7 +987,7 @@ export const EvaluationsDestroyParams = /* @__PURE__ */ zod.object({
/**
* Test Hog evaluation code against sample events without saving.
*/
-export const EvaluationsTestHogCreateParams = /* @__PURE__ */ zod.object({
+export const EvaluationsTestHogCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1008,7 +1008,7 @@ export const evaluationsTestHogCreateBodyTargetConfigOneQuietPeriodSecondsDefaul
export const evaluationsTestHogCreateBodyTargetConfigOneQuietPeriodSecondsMin = 10
export const evaluationsTestHogCreateBodyTargetConfigOneQuietPeriodSecondsMax = 86400
-export const EvaluationsTestHogCreateBody = /* @__PURE__ */ zod.object({
+export const EvaluationsTestHogCreateBody = () => zod.object({
source: zod
.string()
.min(1)
@@ -1058,7 +1058,7 @@ export const EvaluationsTestHogCreateBody = /* @__PURE__ */ zod.object({
/**
* Team-level clustering configuration (event filters for automated pipelines).
*/
-export const LlmAnalyticsClusteringConfigListParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsClusteringConfigListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1069,7 +1069,7 @@ export const LlmAnalyticsClusteringConfigListParams = /* @__PURE__ */ zod.object
/**
* Team-level clustering configuration (event filters for automated pipelines).
*/
-export const LlmAnalyticsClusteringConfigSetEventFiltersCreateParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsClusteringConfigSetEventFiltersCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1077,7 +1077,7 @@ export const LlmAnalyticsClusteringConfigSetEventFiltersCreateParams = /* @__PUR
),
})
-export const LlmAnalyticsClusteringConfigSetEventFiltersCreateBody = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsClusteringConfigSetEventFiltersCreateBody = () => zod.object({
event_filters: zod
.array(zod.record(zod.string(), zod.unknown()))
.describe(
@@ -1088,7 +1088,7 @@ export const LlmAnalyticsClusteringConfigSetEventFiltersCreateBody = /* @__PURE_
/**
* CRUD for clustering job configurations (max 10 per team).
*/
-export const LlmAnalyticsClusteringJobsListParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsClusteringJobsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1096,7 +1096,7 @@ export const LlmAnalyticsClusteringJobsListParams = /* @__PURE__ */ zod.object({
),
})
-export const LlmAnalyticsClusteringJobsListQueryParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsClusteringJobsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
@@ -1104,7 +1104,7 @@ export const LlmAnalyticsClusteringJobsListQueryParams = /* @__PURE__ */ zod.obj
/**
* CRUD for clustering job configurations (max 10 per team).
*/
-export const LlmAnalyticsClusteringJobsCreateParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsClusteringJobsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1114,7 +1114,7 @@ export const LlmAnalyticsClusteringJobsCreateParams = /* @__PURE__ */ zod.object
export const llmAnalyticsClusteringJobsCreateBodyNameMax = 100
-export const LlmAnalyticsClusteringJobsCreateBody = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsClusteringJobsCreateBody = () => zod.object({
name: zod.string().max(llmAnalyticsClusteringJobsCreateBodyNameMax),
analysis_level: zod
.enum(['trace', 'generation', 'evaluation'])
@@ -1126,7 +1126,7 @@ export const LlmAnalyticsClusteringJobsCreateBody = /* @__PURE__ */ zod.object({
/**
* CRUD for clustering job configurations (max 10 per team).
*/
-export const LlmAnalyticsClusteringJobsRetrieveParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsClusteringJobsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this clustering job.'),
project_id: zod
.string()
@@ -1138,7 +1138,7 @@ export const LlmAnalyticsClusteringJobsRetrieveParams = /* @__PURE__ */ zod.obje
/**
* CRUD for clustering job configurations (max 10 per team).
*/
-export const LlmAnalyticsClusteringJobsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsClusteringJobsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this clustering job.'),
project_id: zod
.string()
@@ -1149,7 +1149,7 @@ export const LlmAnalyticsClusteringJobsPartialUpdateParams = /* @__PURE__ */ zod
export const llmAnalyticsClusteringJobsPartialUpdateBodyNameMax = 100
-export const LlmAnalyticsClusteringJobsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsClusteringJobsPartialUpdateBody = () => zod.object({
name: zod.string().max(llmAnalyticsClusteringJobsPartialUpdateBodyNameMax).optional(),
analysis_level: zod
.enum(['trace', 'generation', 'evaluation'])
@@ -1162,7 +1162,7 @@ export const LlmAnalyticsClusteringJobsPartialUpdateBody = /* @__PURE__ */ zod.o
/**
* CRUD for clustering job configurations (max 10 per team).
*/
-export const LlmAnalyticsClusteringJobsDestroyParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsClusteringJobsDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this clustering job.'),
project_id: zod
.string()
@@ -1174,7 +1174,7 @@ export const LlmAnalyticsClusteringJobsDestroyParams = /* @__PURE__ */ zod.objec
/**
* Get the evaluation config for this team
*/
-export const LlmAnalyticsEvaluationConfigRetrieveParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsEvaluationConfigRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1185,7 +1185,7 @@ export const LlmAnalyticsEvaluationConfigRetrieveParams = /* @__PURE__ */ zod.ob
/**
* Set the active provider key for evaluations
*/
-export const LlmAnalyticsEvaluationConfigSetActiveKeyCreateParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsEvaluationConfigSetActiveKeyCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1193,7 +1193,7 @@ export const LlmAnalyticsEvaluationConfigSetActiveKeyCreateParams = /* @__PURE__
),
})
-export const LlmAnalyticsEvaluationConfigSetActiveKeyCreateBody = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsEvaluationConfigSetActiveKeyCreateBody = () => zod.object({
key_id: zod
.string()
.describe(
@@ -1204,7 +1204,7 @@ export const LlmAnalyticsEvaluationConfigSetActiveKeyCreateBody = /* @__PURE__ *
/**
* CRUD for evaluation report configurations + report run history.
*/
-export const LlmAnalyticsEvaluationReportsListParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsEvaluationReportsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1212,7 +1212,7 @@ export const LlmAnalyticsEvaluationReportsListParams = /* @__PURE__ */ zod.objec
),
})
-export const LlmAnalyticsEvaluationReportsListQueryParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsEvaluationReportsListQueryParams = () => zod.object({
evaluation: zod.string().optional().describe('Only return report configs for this evaluation UUID.'),
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
@@ -1221,7 +1221,7 @@ export const LlmAnalyticsEvaluationReportsListQueryParams = /* @__PURE__ */ zod.
/**
* CRUD for evaluation report configurations + report run history.
*/
-export const LlmAnalyticsEvaluationReportsCreateParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsEvaluationReportsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1240,7 +1240,7 @@ export const llmAnalyticsEvaluationReportsCreateBodyCooldownMinutesMax = 1440
export const llmAnalyticsEvaluationReportsCreateBodyDailyRunCapMax = 24
-export const LlmAnalyticsEvaluationReportsCreateBody = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsEvaluationReportsCreateBody = () => zod.object({
evaluation: zod.string().describe('UUID of the evaluation this report config belongs to.'),
frequency: zod
.enum(['scheduled', 'every_n'])
@@ -1303,7 +1303,7 @@ export const LlmAnalyticsEvaluationReportsCreateBody = /* @__PURE__ */ zod.objec
/**
* CRUD for evaluation report configurations + report run history.
*/
-export const LlmAnalyticsEvaluationReportsRetrieveParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsEvaluationReportsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this evaluation report.'),
project_id: zod
.string()
@@ -1315,7 +1315,7 @@ export const LlmAnalyticsEvaluationReportsRetrieveParams = /* @__PURE__ */ zod.o
/**
* CRUD for evaluation report configurations + report run history.
*/
-export const LlmAnalyticsEvaluationReportsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsEvaluationReportsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this evaluation report.'),
project_id: zod
.string()
@@ -1335,7 +1335,7 @@ export const llmAnalyticsEvaluationReportsPartialUpdateBodyCooldownMinutesMax =
export const llmAnalyticsEvaluationReportsPartialUpdateBodyDailyRunCapMax = 24
-export const LlmAnalyticsEvaluationReportsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsEvaluationReportsPartialUpdateBody = () => zod.object({
frequency: zod
.enum(['scheduled', 'every_n'])
.describe('\* `scheduled` - Scheduled\n\* `every_n` - Every N')
@@ -1397,7 +1397,7 @@ export const LlmAnalyticsEvaluationReportsPartialUpdateBody = /* @__PURE__ */ zo
/**
* Trigger immediate report generation.
*/
-export const LlmAnalyticsEvaluationReportsGenerateCreateParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsEvaluationReportsGenerateCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this evaluation report.'),
project_id: zod
.string()
@@ -1409,7 +1409,7 @@ export const LlmAnalyticsEvaluationReportsGenerateCreateParams = /* @__PURE__ */
/**
* List report runs (history) for this report.
*/
-export const LlmAnalyticsEvaluationReportsRunsListParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsEvaluationReportsRunsListParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this evaluation report.'),
project_id: zod
.string()
@@ -1418,7 +1418,7 @@ export const LlmAnalyticsEvaluationReportsRunsListParams = /* @__PURE__ */ zod.o
),
})
-export const LlmAnalyticsEvaluationReportsRunsListQueryParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsEvaluationReportsRunsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
@@ -1426,7 +1426,7 @@ export const LlmAnalyticsEvaluationReportsRunsListQueryParams = /* @__PURE__ */
/**
* List available models, for one provider or for every supported provider.
*/
-export const LlmAnalyticsModelsRetrieveParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsModelsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1434,7 +1434,7 @@ export const LlmAnalyticsModelsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const LlmAnalyticsModelsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsModelsRetrieveQueryParams = () => zod.object({
key_id: zod
.string()
.optional()
@@ -1459,7 +1459,7 @@ export const LlmAnalyticsModelsRetrieveQueryParams = /* @__PURE__ */ zod.object(
),
})
-export const LlmAnalyticsProviderKeysListParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsProviderKeysListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1467,12 +1467,12 @@ export const LlmAnalyticsProviderKeysListParams = /* @__PURE__ */ zod.object({
),
})
-export const LlmAnalyticsProviderKeysListQueryParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsProviderKeysListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const LlmAnalyticsProviderKeysRetrieveParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsProviderKeysRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this llm provider key.'),
project_id: zod
.string()
@@ -1481,7 +1481,7 @@ export const LlmAnalyticsProviderKeysRetrieveParams = /* @__PURE__ */ zod.object
),
})
-export const LlmAnalyticsReviewQueueItemsListParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsReviewQueueItemsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1489,7 +1489,7 @@ export const LlmAnalyticsReviewQueueItemsListParams = /* @__PURE__ */ zod.object
),
})
-export const LlmAnalyticsReviewQueueItemsListQueryParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsReviewQueueItemsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
order_by: zod.string().optional().describe('Order by `created_at` or `updated_at`.'),
@@ -1499,7 +1499,7 @@ export const LlmAnalyticsReviewQueueItemsListQueryParams = /* @__PURE__ */ zod.o
trace_id__in: zod.string().optional().describe('Filter by multiple trace IDs separated by commas.'),
})
-export const LlmAnalyticsReviewQueueItemsCreateParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsReviewQueueItemsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1509,7 +1509,7 @@ export const LlmAnalyticsReviewQueueItemsCreateParams = /* @__PURE__ */ zod.obje
export const llmAnalyticsReviewQueueItemsCreateBodyTraceIdMax = 255
-export const LlmAnalyticsReviewQueueItemsCreateBody = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsReviewQueueItemsCreateBody = () => zod.object({
queue_id: zod.string().describe('Review queue ID that should own this pending trace.'),
trace_id: zod
.string()
@@ -1517,7 +1517,7 @@ export const LlmAnalyticsReviewQueueItemsCreateBody = /* @__PURE__ */ zod.object
.describe('Trace ID to add to the selected review queue.'),
})
-export const LlmAnalyticsReviewQueueItemsRetrieveParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsReviewQueueItemsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this review queue item.'),
project_id: zod
.string()
@@ -1526,7 +1526,7 @@ export const LlmAnalyticsReviewQueueItemsRetrieveParams = /* @__PURE__ */ zod.ob
),
})
-export const LlmAnalyticsReviewQueueItemsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsReviewQueueItemsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this review queue item.'),
project_id: zod
.string()
@@ -1535,11 +1535,11 @@ export const LlmAnalyticsReviewQueueItemsPartialUpdateParams = /* @__PURE__ */ z
),
})
-export const LlmAnalyticsReviewQueueItemsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsReviewQueueItemsPartialUpdateBody = () => zod.object({
queue_id: zod.string().optional().describe('Review queue ID that should own this pending trace.'),
})
-export const LlmAnalyticsReviewQueueItemsDestroyParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsReviewQueueItemsDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this review queue item.'),
project_id: zod
.string()
@@ -1548,7 +1548,7 @@ export const LlmAnalyticsReviewQueueItemsDestroyParams = /* @__PURE__ */ zod.obj
),
})
-export const LlmAnalyticsReviewQueuesListParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsReviewQueuesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1556,7 +1556,7 @@ export const LlmAnalyticsReviewQueuesListParams = /* @__PURE__ */ zod.object({
),
})
-export const LlmAnalyticsReviewQueuesListQueryParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsReviewQueuesListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
name: zod.string().optional(),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
@@ -1564,7 +1564,7 @@ export const LlmAnalyticsReviewQueuesListQueryParams = /* @__PURE__ */ zod.objec
search: zod.string().optional().describe('Search review queue names.'),
})
-export const LlmAnalyticsReviewQueuesCreateParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsReviewQueuesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1574,11 +1574,11 @@ export const LlmAnalyticsReviewQueuesCreateParams = /* @__PURE__ */ zod.object({
export const llmAnalyticsReviewQueuesCreateBodyNameMax = 255
-export const LlmAnalyticsReviewQueuesCreateBody = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsReviewQueuesCreateBody = () => zod.object({
name: zod.string().max(llmAnalyticsReviewQueuesCreateBodyNameMax).describe('Human-readable queue name.'),
})
-export const LlmAnalyticsReviewQueuesRetrieveParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsReviewQueuesRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this review queue.'),
project_id: zod
.string()
@@ -1587,7 +1587,7 @@ export const LlmAnalyticsReviewQueuesRetrieveParams = /* @__PURE__ */ zod.object
),
})
-export const LlmAnalyticsReviewQueuesPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsReviewQueuesPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this review queue.'),
project_id: zod
.string()
@@ -1598,7 +1598,7 @@ export const LlmAnalyticsReviewQueuesPartialUpdateParams = /* @__PURE__ */ zod.o
export const llmAnalyticsReviewQueuesPartialUpdateBodyNameMax = 255
-export const LlmAnalyticsReviewQueuesPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsReviewQueuesPartialUpdateBody = () => zod.object({
name: zod
.string()
.max(llmAnalyticsReviewQueuesPartialUpdateBodyNameMax)
@@ -1606,7 +1606,7 @@ export const LlmAnalyticsReviewQueuesPartialUpdateBody = /* @__PURE__ */ zod.obj
.describe('Human-readable queue name.'),
})
-export const LlmAnalyticsReviewQueuesDestroyParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsReviewQueuesDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this review queue.'),
project_id: zod
.string()
@@ -1615,7 +1615,7 @@ export const LlmAnalyticsReviewQueuesDestroyParams = /* @__PURE__ */ zod.object(
),
})
-export const LlmAnalyticsScoreDefinitionsListParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsScoreDefinitionsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1623,7 +1623,7 @@ export const LlmAnalyticsScoreDefinitionsListParams = /* @__PURE__ */ zod.object
),
})
-export const LlmAnalyticsScoreDefinitionsListQueryParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsScoreDefinitionsListQueryParams = () => zod.object({
archived: zod.boolean().optional().describe('Filter by archived state.'),
kind: zod.string().optional().describe('Filter by scorer kind.'),
limit: zod.number().optional().describe('Number of results to return per page.'),
@@ -1632,7 +1632,7 @@ export const LlmAnalyticsScoreDefinitionsListQueryParams = /* @__PURE__ */ zod.o
search: zod.string().optional().describe('Search scorers by name or description.'),
})
-export const LlmAnalyticsScoreDefinitionsCreateParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsScoreDefinitionsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1647,7 +1647,7 @@ export const llmAnalyticsScoreDefinitionsCreateBodyConfigOneOneOptionsItemKeyMax
export const llmAnalyticsScoreDefinitionsCreateBodyConfigOneOneOptionsItemLabelMax = 256
-export const LlmAnalyticsScoreDefinitionsCreateBody = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsScoreDefinitionsCreateBody = () => zod.object({
name: zod.string().max(llmAnalyticsScoreDefinitionsCreateBodyNameMax).describe('Human-readable scorer name.'),
description: zod.string().nullish().describe('Optional human-readable description.'),
kind: zod
@@ -1717,7 +1717,7 @@ export const LlmAnalyticsScoreDefinitionsCreateBody = /* @__PURE__ */ zod.object
.describe('Initial immutable scorer configuration.'),
})
-export const LlmAnalyticsScoreDefinitionsRetrieveParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsScoreDefinitionsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this score definition.'),
project_id: zod
.string()
@@ -1726,7 +1726,7 @@ export const LlmAnalyticsScoreDefinitionsRetrieveParams = /* @__PURE__ */ zod.ob
),
})
-export const LlmAnalyticsScoreDefinitionsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsScoreDefinitionsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this score definition.'),
project_id: zod
.string()
@@ -1737,7 +1737,7 @@ export const LlmAnalyticsScoreDefinitionsPartialUpdateParams = /* @__PURE__ */ z
export const llmAnalyticsScoreDefinitionsPartialUpdateBodyNameMax = 255
-export const LlmAnalyticsScoreDefinitionsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsScoreDefinitionsPartialUpdateBody = () => zod.object({
name: zod
.string()
.max(llmAnalyticsScoreDefinitionsPartialUpdateBodyNameMax)
@@ -1747,7 +1747,7 @@ export const LlmAnalyticsScoreDefinitionsPartialUpdateBody = /* @__PURE__ */ zod
archived: zod.boolean().optional().describe('Whether the scorer is archived.'),
})
-export const LlmAnalyticsScoreDefinitionsNewVersionCreateParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsScoreDefinitionsNewVersionCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this score definition.'),
project_id: zod
.string()
@@ -1760,7 +1760,7 @@ export const llmAnalyticsScoreDefinitionsNewVersionCreateBodyConfigOneOneOptions
export const llmAnalyticsScoreDefinitionsNewVersionCreateBodyConfigOneOneOptionsItemLabelMax = 256
-export const LlmAnalyticsScoreDefinitionsNewVersionCreateBody = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsScoreDefinitionsNewVersionCreateBody = () => zod.object({
config: zod
.union([
zod.object({
@@ -1849,7 +1849,7 @@ export const LlmAnalyticsScoreDefinitionsNewVersionCreateBody = /* @__PURE__ */
* The response includes the structured summary, the text representation, and metadata.
*
*/
-export const LlmAnalyticsSummarizationCreateParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsSummarizationCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1860,7 +1860,7 @@ export const LlmAnalyticsSummarizationCreateParams = /* @__PURE__ */ zod.object(
export const llmAnalyticsSummarizationCreateBodyModeDefault = `minimal`
export const llmAnalyticsSummarizationCreateBodyForceRefreshDefault = false
-export const LlmAnalyticsSummarizationCreateBody = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsSummarizationCreateBody = () => zod.object({
summarize_type: zod
.enum(['trace', 'event'])
.describe('\* `trace` - trace\n\* `event` - event')
@@ -1905,7 +1905,7 @@ export const LlmAnalyticsSummarizationCreateBody = /* @__PURE__ */ zod.object({
date_to: zod.string().nullish().describe('End of date range for ID-based lookup. Defaults to now.'),
})
-export const LlmAnalyticsTraceReviewsListParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsTraceReviewsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1913,7 +1913,7 @@ export const LlmAnalyticsTraceReviewsListParams = /* @__PURE__ */ zod.object({
),
})
-export const LlmAnalyticsTraceReviewsListQueryParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsTraceReviewsListQueryParams = () => zod.object({
definition_id: zod.string().optional().describe('Filter by a stable scorer definition ID.'),
definition_id__in: zod
.string()
@@ -1927,7 +1927,7 @@ export const LlmAnalyticsTraceReviewsListQueryParams = /* @__PURE__ */ zod.objec
trace_id__in: zod.string().optional().describe('Filter by multiple trace IDs separated by commas.'),
})
-export const LlmAnalyticsTraceReviewsCreateParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsTraceReviewsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1941,7 +1941,7 @@ export const llmAnalyticsTraceReviewsCreateBodyScoresItemCategoricalValuesItemMa
export const llmAnalyticsTraceReviewsCreateBodyScoresItemNumericValueRegExp = new RegExp('^-?\\d{0,6}(?:\\.\\d{0,6})?$')
-export const LlmAnalyticsTraceReviewsCreateBody = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsTraceReviewsCreateBody = () => zod.object({
trace_id: zod
.string()
.max(llmAnalyticsTraceReviewsCreateBodyTraceIdMax)
@@ -1977,7 +1977,7 @@ export const LlmAnalyticsTraceReviewsCreateBody = /* @__PURE__ */ zod.object({
),
})
-export const LlmAnalyticsTraceReviewsRetrieveParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsTraceReviewsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this trace review.'),
project_id: zod
.string()
@@ -1986,7 +1986,7 @@ export const LlmAnalyticsTraceReviewsRetrieveParams = /* @__PURE__ */ zod.object
),
})
-export const LlmAnalyticsTraceReviewsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsTraceReviewsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this trace review.'),
project_id: zod
.string()
@@ -2003,7 +2003,7 @@ export const llmAnalyticsTraceReviewsPartialUpdateBodyScoresItemNumericValueRegE
'^-?\\d{0,6}(?:\\.\\d{0,6})?$'
)
-export const LlmAnalyticsTraceReviewsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsTraceReviewsPartialUpdateBody = () => zod.object({
trace_id: zod
.string()
.max(llmAnalyticsTraceReviewsPartialUpdateBodyTraceIdMax)
@@ -2042,7 +2042,7 @@ export const LlmAnalyticsTraceReviewsPartialUpdateBody = /* @__PURE__ */ zod.obj
),
})
-export const LlmAnalyticsTraceReviewsDestroyParams = /* @__PURE__ */ zod.object({
+export const LlmAnalyticsTraceReviewsDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this trace review.'),
project_id: zod
.string()
@@ -2051,7 +2051,7 @@ export const LlmAnalyticsTraceReviewsDestroyParams = /* @__PURE__ */ zod.object(
),
})
-export const LlmPromptsListParams = /* @__PURE__ */ zod.object({
+export const LlmPromptsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2062,7 +2062,7 @@ export const LlmPromptsListParams = /* @__PURE__ */ zod.object({
export const llmPromptsListQueryContentDefault = `full`
export const llmPromptsListQueryOrderByDefault = `-created_at`
-export const LlmPromptsListQueryParams = /* @__PURE__ */ zod.object({
+export const LlmPromptsListQueryParams = () => zod.object({
content: zod
.enum(['full', 'preview', 'none'])
.default(llmPromptsListQueryContentDefault)
@@ -2082,7 +2082,7 @@ export const LlmPromptsListQueryParams = /* @__PURE__ */ zod.object({
search: zod.string().optional().describe('Optional substring filter applied to prompt names and prompt content.'),
})
-export const LlmPromptsCreateParams = /* @__PURE__ */ zod.object({
+export const LlmPromptsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2094,7 +2094,7 @@ export const llmPromptsCreateBodyNameMax = 255
export const llmPromptsCreateBodyVersionDescriptionMax = 400
-export const LlmPromptsCreateBody = /* @__PURE__ */ zod.object({
+export const LlmPromptsCreateBody = () => zod.object({
name: zod
.string()
.max(llmPromptsCreateBodyNameMax)
@@ -2115,7 +2115,7 @@ export const LlmPromptsCreateBody = /* @__PURE__ */ zod.object({
export const llmPromptsNameRetrievePathPromptNameRegExp = new RegExp('^[^\/]+$')
-export const LlmPromptsNameRetrieveParams = /* @__PURE__ */ zod.object({
+export const LlmPromptsNameRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2127,7 +2127,7 @@ export const LlmPromptsNameRetrieveParams = /* @__PURE__ */ zod.object({
export const llmPromptsNameRetrieveQueryContentDefault = `full`
export const llmPromptsNameRetrieveQueryLabelMax = 128
-export const LlmPromptsNameRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const LlmPromptsNameRetrieveQueryParams = () => zod.object({
content: zod
.enum(['full', 'preview', 'none'])
.default(llmPromptsNameRetrieveQueryContentDefault)
@@ -2151,7 +2151,7 @@ export const LlmPromptsNameRetrieveQueryParams = /* @__PURE__ */ zod.object({
export const llmPromptsNamePartialUpdatePathPromptNameRegExp = new RegExp('^[^\/]+$')
-export const LlmPromptsNamePartialUpdateParams = /* @__PURE__ */ zod.object({
+export const LlmPromptsNamePartialUpdateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2162,7 +2162,7 @@ export const LlmPromptsNamePartialUpdateParams = /* @__PURE__ */ zod.object({
export const llmPromptsNamePartialUpdateBodyVersionDescriptionMax = 400
-export const LlmPromptsNamePartialUpdateBody = /* @__PURE__ */ zod.object({
+export const LlmPromptsNamePartialUpdateBody = () => zod.object({
prompt: zod
.unknown()
.optional()
@@ -2198,7 +2198,7 @@ export const LlmPromptsNamePartialUpdateBody = /* @__PURE__ */ zod.object({
export const llmPromptsNameDuplicateCreatePathPromptNameRegExp = new RegExp('^[^\/]+$')
-export const LlmPromptsNameDuplicateCreateParams = /* @__PURE__ */ zod.object({
+export const LlmPromptsNameDuplicateCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2209,7 +2209,7 @@ export const LlmPromptsNameDuplicateCreateParams = /* @__PURE__ */ zod.object({
export const llmPromptsNameDuplicateCreateBodyNewNameMax = 255
-export const LlmPromptsNameDuplicateCreateBody = /* @__PURE__ */ zod.object({
+export const LlmPromptsNameDuplicateCreateBody = () => zod.object({
new_name: zod
.string()
.max(llmPromptsNameDuplicateCreateBodyNewNameMax)
@@ -2221,7 +2221,7 @@ export const LlmPromptsNameDuplicateCreateBody = /* @__PURE__ */ zod.object({
export const llmPromptsNameLabelsUpdatePathLabelNameRegExp = new RegExp('^[^\/]+$')
export const llmPromptsNameLabelsUpdatePathPromptNameRegExp = new RegExp('^[^\/]+$')
-export const LlmPromptsNameLabelsUpdateParams = /* @__PURE__ */ zod.object({
+export const LlmPromptsNameLabelsUpdateParams = () => zod.object({
label_name: zod.string().regex(llmPromptsNameLabelsUpdatePathLabelNameRegExp),
project_id: zod
.string()
@@ -2231,7 +2231,7 @@ export const LlmPromptsNameLabelsUpdateParams = /* @__PURE__ */ zod.object({
prompt_name: zod.string().regex(llmPromptsNameLabelsUpdatePathPromptNameRegExp),
})
-export const LlmPromptsNameLabelsUpdateBody = /* @__PURE__ */ zod.object({
+export const LlmPromptsNameLabelsUpdateBody = () => zod.object({
version: zod
.number()
.min(1)
@@ -2243,7 +2243,7 @@ export const LlmPromptsNameLabelsUpdateBody = /* @__PURE__ */ zod.object({
export const llmPromptsNameLabelsDestroyPathLabelNameRegExp = new RegExp('^[^\/]+$')
export const llmPromptsNameLabelsDestroyPathPromptNameRegExp = new RegExp('^[^\/]+$')
-export const LlmPromptsNameLabelsDestroyParams = /* @__PURE__ */ zod.object({
+export const LlmPromptsNameLabelsDestroyParams = () => zod.object({
label_name: zod.string().regex(llmPromptsNameLabelsDestroyPathLabelNameRegExp),
project_id: zod
.string()
@@ -2253,7 +2253,7 @@ export const LlmPromptsNameLabelsDestroyParams = /* @__PURE__ */ zod.object({
prompt_name: zod.string().regex(llmPromptsNameLabelsDestroyPathPromptNameRegExp),
})
-export const TaggersListParams = /* @__PURE__ */ zod.object({
+export const TaggersListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2261,7 +2261,7 @@ export const TaggersListParams = /* @__PURE__ */ zod.object({
),
})
-export const TaggersListQueryParams = /* @__PURE__ */ zod.object({
+export const TaggersListQueryParams = () => zod.object({
enabled: zod.boolean().optional().describe('Filter by enabled status'),
id__in: zod.array(zod.string()).optional().describe('Multiple values may be separated by commas.'),
limit: zod.number().optional().describe('Number of results to return per page.'),
@@ -2275,7 +2275,7 @@ export const TaggersListQueryParams = /* @__PURE__ */ zod.object({
search: zod.string().optional().describe('Search in name or description'),
})
-export const TaggersCreateParams = /* @__PURE__ */ zod.object({
+export const TaggersCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2307,7 +2307,7 @@ export const taggersCreateBodyConditionsItemRolloutPercentageMax = 100
export const taggersCreateBodyModelConfigurationOneModelMax = 100
-export const TaggersCreateBody = /* @__PURE__ */ zod.object({
+export const TaggersCreateBody = () => zod.object({
name: zod.string().max(taggersCreateBodyNameMax),
description: zod.string().optional(),
enabled: zod.boolean().optional(),
@@ -2425,7 +2425,7 @@ export const TaggersCreateBody = /* @__PURE__ */ zod.object({
/**
* Test Hog tagger code against sample events without saving.
*/
-export const TaggersTestHogCreateParams = /* @__PURE__ */ zod.object({
+export const TaggersTestHogCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2441,7 +2441,7 @@ export const taggersTestHogCreateBodyTagsItemNameMax = 100
export const taggersTestHogCreateBodyTagsItemDescriptionDefault = ``
export const taggersTestHogCreateBodyTagsItemDescriptionMax = 500
-export const TaggersTestHogCreateBody = /* @__PURE__ */ zod.object({
+export const TaggersTestHogCreateBody = () => zod.object({
source: zod
.string()
.min(1)
diff --git a/services/mcp/src/generated/alerts/api.ts b/services/mcp/src/generated/alerts/api.ts
index 34622eb0e7c8..e28c848f49fb 100644
--- a/services/mcp/src/generated/alerts/api.ts
+++ b/services/mcp/src/generated/alerts/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const AlertsListParams = /* @__PURE__ */ zod.object({
+export const AlertsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,7 +16,7 @@ export const AlertsListParams = /* @__PURE__ */ zod.object({
),
})
-export const AlertsListQueryParams = /* @__PURE__ */ zod.object({
+export const AlertsListQueryParams = () => zod.object({
created_by: zod
.string()
.optional()
@@ -37,7 +37,7 @@ export const AlertsListQueryParams = /* @__PURE__ */ zod.object({
),
})
-export const AlertsCreateParams = /* @__PURE__ */ zod.object({
+export const AlertsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -79,7 +79,7 @@ export const alertsCreateBodyDetectorConfigOneOneoneTypeDefault = `lof`
export const alertsCreateBodyDetectorConfigOneOnetwoTypeDefault = `ocsvm`
export const alertsCreateBodyDetectorConfigOneOnethreeTypeDefault = `pca`
-export const AlertsCreateBody = /* @__PURE__ */ zod.object({
+export const AlertsCreateBody = () => zod.object({
insight: zod
.number()
.describe('Insight ID monitored by this alert. Note: Response returns full InsightBasicSerializer object.'),
@@ -1308,7 +1308,7 @@ export const AlertsCreateBody = /* @__PURE__ */ zod.object({
),
})
-export const AlertsRetrieveParams = /* @__PURE__ */ zod.object({
+export const AlertsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this alert configuration.'),
project_id: zod
.string()
@@ -1317,7 +1317,7 @@ export const AlertsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const AlertsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const AlertsRetrieveQueryParams = () => zod.object({
checks_date_from: zod
.string()
.optional()
@@ -1340,7 +1340,7 @@ export const AlertsRetrieveQueryParams = /* @__PURE__ */ zod.object({
.describe('Number of newest checks to skip (0-based). Use with checks_limit for pagination. Default 0.'),
})
-export const AlertsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const AlertsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this alert configuration.'),
project_id: zod
.string()
@@ -1383,7 +1383,7 @@ export const alertsPartialUpdateBodyDetectorConfigOneOneoneTypeDefault = `lof`
export const alertsPartialUpdateBodyDetectorConfigOneOnetwoTypeDefault = `ocsvm`
export const alertsPartialUpdateBodyDetectorConfigOneOnethreeTypeDefault = `pca`
-export const AlertsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const AlertsPartialUpdateBody = () => zod.object({
insight: zod
.number()
.optional()
@@ -2637,7 +2637,7 @@ export const AlertsPartialUpdateBody = /* @__PURE__ */ zod.object({
),
})
-export const AlertsDestroyParams = /* @__PURE__ */ zod.object({
+export const AlertsDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this alert configuration.'),
project_id: zod
.string()
@@ -2649,7 +2649,7 @@ export const AlertsDestroyParams = /* @__PURE__ */ zod.object({
/**
* Simulate a detector on an insight's historical data. Read-only — no AlertCheck records are created.
*/
-export const AlertsSimulateCreateParams = /* @__PURE__ */ zod.object({
+export const AlertsSimulateCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2688,7 +2688,7 @@ export const alertsSimulateCreateBodyConfigOneTwoTypeDefault = `HogQLAlertConfig
export const alertsSimulateCreateBodyConfigOneThreeTypeDefault = `FunnelsAlertConfig`
export const alertsSimulateCreateBodyConfigOneFourTypeDefault = `MetricsAlertConfig`
-export const AlertsSimulateCreateBody = /* @__PURE__ */ zod.object({
+export const AlertsSimulateCreateBody = () => zod.object({
insight: zod
.union([zod.number(), zod.string()])
.describe('Numeric insight ID or saved insight short ID to simulate the detector on.'),
diff --git a/services/mcp/src/generated/annotations/api.ts b/services/mcp/src/generated/annotations/api.ts
index 7c4d2fe93bd3..6f5261aa85a0 100644
--- a/services/mcp/src/generated/annotations/api.ts
+++ b/services/mcp/src/generated/annotations/api.ts
@@ -11,7 +11,7 @@ import * as zod from 'zod'
/**
* Create, Read, Update and Delete annotations. [See docs](https://posthog.com/docs/data/annotations) for more information on annotations.
*/
-export const AnnotationsListParams = /* @__PURE__ */ zod.object({
+export const AnnotationsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -19,7 +19,7 @@ export const AnnotationsListParams = /* @__PURE__ */ zod.object({
),
})
-export const AnnotationsListQueryParams = /* @__PURE__ */ zod.object({
+export const AnnotationsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
search: zod.string().optional().describe('A search term.'),
@@ -28,7 +28,7 @@ export const AnnotationsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Create, Read, Update and Delete annotations. [See docs](https://posthog.com/docs/data/annotations) for more information on annotations.
*/
-export const AnnotationsCreateParams = /* @__PURE__ */ zod.object({
+export const AnnotationsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -40,7 +40,7 @@ export const annotationsCreateBodyContentMax = 8192
export const annotationsCreateBodyEmojiMax = 16
-export const AnnotationsCreateBody = /* @__PURE__ */ zod.object({
+export const AnnotationsCreateBody = () => zod.object({
content: zod
.string()
.max(annotationsCreateBodyContentMax)
@@ -94,7 +94,7 @@ export const AnnotationsCreateBody = /* @__PURE__ */ zod.object({
/**
* Create, Read, Update and Delete annotations. [See docs](https://posthog.com/docs/data/annotations) for more information on annotations.
*/
-export const AnnotationsRetrieveParams = /* @__PURE__ */ zod.object({
+export const AnnotationsRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this annotation.'),
project_id: zod
.string()
@@ -106,7 +106,7 @@ export const AnnotationsRetrieveParams = /* @__PURE__ */ zod.object({
/**
* Create, Read, Update and Delete annotations. [See docs](https://posthog.com/docs/data/annotations) for more information on annotations.
*/
-export const AnnotationsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const AnnotationsPartialUpdateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this annotation.'),
project_id: zod
.string()
@@ -119,7 +119,7 @@ export const annotationsPartialUpdateBodyContentMax = 8192
export const annotationsPartialUpdateBodyEmojiMax = 16
-export const AnnotationsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const AnnotationsPartialUpdateBody = () => zod.object({
content: zod
.string()
.max(annotationsPartialUpdateBodyContentMax)
@@ -173,7 +173,7 @@ export const AnnotationsPartialUpdateBody = /* @__PURE__ */ zod.object({
/**
* Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
*/
-export const AnnotationsDestroyParams = /* @__PURE__ */ zod.object({
+export const AnnotationsDestroyParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this annotation.'),
project_id: zod
.string()
diff --git a/services/mcp/src/generated/batch_exports/api.ts b/services/mcp/src/generated/batch_exports/api.ts
index 53fbbf652eac..784c05ad5a5c 100644
--- a/services/mcp/src/generated/batch_exports/api.ts
+++ b/services/mcp/src/generated/batch_exports/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const BatchExportsListParams = /* @__PURE__ */ zod.object({
+export const BatchExportsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,12 +16,12 @@ export const BatchExportsListParams = /* @__PURE__ */ zod.object({
),
})
-export const BatchExportsListQueryParams = /* @__PURE__ */ zod.object({
+export const BatchExportsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const BatchExportsCreateParams = /* @__PURE__ */ zod.object({
+export const BatchExportsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -53,7 +53,7 @@ export const batchExportsCreateBodyOffsetDayMax = 6
export const batchExportsCreateBodyOffsetHourMin = 0
export const batchExportsCreateBodyOffsetHourMax = 23
-export const BatchExportsCreateBody = /* @__PURE__ */ zod
+export const BatchExportsCreateBody = () => zod
.object({
name: zod.string().describe('Human-readable name for the batch export.'),
model: zod
@@ -461,7 +461,7 @@ export const BatchExportsCreateBody = /* @__PURE__ */ zod
'Request body for create\/partial_update on BatchExportViewSet.\n\nMirrors the writeable fields of `BatchExportSerializer` but uses a polymorphic\n`destination` schema so integration_id is marked required on the types that need\nit. Responses continue to use `BatchExportSerializer`.'
)
-export const BatchExportsRetrieveParams = /* @__PURE__ */ zod.object({
+export const BatchExportsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this batch export.'),
project_id: zod
.string()
@@ -470,7 +470,7 @@ export const BatchExportsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const BatchExportsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const BatchExportsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this batch export.'),
project_id: zod
.string()
@@ -503,7 +503,7 @@ export const batchExportsPartialUpdateBodyOffsetDayMax = 6
export const batchExportsPartialUpdateBodyOffsetHourMin = 0
export const batchExportsPartialUpdateBodyOffsetHourMax = 23
-export const BatchExportsPartialUpdateBody = /* @__PURE__ */ zod
+export const BatchExportsPartialUpdateBody = () => zod
.object({
name: zod.string().optional().describe('Human-readable name for the batch export.'),
model: zod
@@ -917,7 +917,7 @@ export const BatchExportsPartialUpdateBody = /* @__PURE__ */ zod
'Request body for create\/partial_update on BatchExportViewSet.\n\nMirrors the writeable fields of `BatchExportSerializer` but uses a polymorphic\n`destination` schema so integration_id is marked required on the types that need\nit. Responses continue to use `BatchExportSerializer`.'
)
-export const BatchExportsDestroyParams = /* @__PURE__ */ zod.object({
+export const BatchExportsDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this batch export.'),
project_id: zod
.string()
@@ -929,7 +929,7 @@ export const BatchExportsDestroyParams = /* @__PURE__ */ zod.object({
/**
* Create and start a batch export on demand run to download a file.
*/
-export const FileDownloadBatchExportsCreateParams = /* @__PURE__ */ zod.object({
+export const FileDownloadBatchExportsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -949,7 +949,7 @@ export const fileDownloadBatchExportsCreateBodyThreeFileMaxSizeMbMin = 0
export const fileDownloadBatchExportsCreateBodyFourFileFormatDefault = `Parquet`
export const fileDownloadBatchExportsCreateBodyFourFileMaxSizeMbMin = 0
-export const FileDownloadBatchExportsCreateBody = /* @__PURE__ */ zod.union([
+export const FileDownloadBatchExportsCreateBody = () => zod.union([
zod
.object({
file: zod
@@ -1100,7 +1100,7 @@ export const FileDownloadBatchExportsCreateBody = /* @__PURE__ */ zod.union([
* generated file downloads so that users may download them by making a request
* to /download.
*/
-export const FileDownloadBatchExportsRetrieveParams = /* @__PURE__ */ zod.object({
+export const FileDownloadBatchExportsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this batch export run.'),
project_id: zod
.string()
@@ -1112,7 +1112,7 @@ export const FileDownloadBatchExportsRetrieveParams = /* @__PURE__ */ zod.object
/**
* Cancel an ongoing file-download batch export.
*/
-export const FileDownloadBatchExportsCancelCreateParams = /* @__PURE__ */ zod.object({
+export const FileDownloadBatchExportsCancelCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this batch export run.'),
project_id: zod
.string()
@@ -1124,7 +1124,7 @@ export const FileDownloadBatchExportsCancelCreateParams = /* @__PURE__ */ zod.ob
export const fileDownloadBatchExportsCancelCreateBodyFileFormatDefault = `Parquet`
export const fileDownloadBatchExportsCancelCreateBodyFileMaxSizeMbMin = 0
-export const FileDownloadBatchExportsCancelCreateBody = /* @__PURE__ */ zod
+export const FileDownloadBatchExportsCancelCreateBody = () => zod
.object({
file: zod
.object({
@@ -1175,7 +1175,7 @@ export const FileDownloadBatchExportsCancelCreateBody = /* @__PURE__ */ zod
/**
* Count the rows a HogQL batch export would produce if started now.
*/
-export const FileDownloadBatchExportsCountRowsCreateParams = /* @__PURE__ */ zod.object({
+export const FileDownloadBatchExportsCountRowsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1183,7 +1183,7 @@ export const FileDownloadBatchExportsCountRowsCreateParams = /* @__PURE__ */ zod
),
})
-export const FileDownloadBatchExportsCountRowsCreateBody = /* @__PURE__ */ zod
+export const FileDownloadBatchExportsCountRowsCreateBody = () => zod
.object({
model: zod
.enum(['hogql'])
diff --git a/services/mcp/src/generated/billing/api.ts b/services/mcp/src/generated/billing/api.ts
index 0e84294dc5fe..a20de1575e91 100644
--- a/services/mcp/src/generated/billing/api.ts
+++ b/services/mcp/src/generated/billing/api.ts
@@ -11,7 +11,7 @@ import * as zod from 'zod'
/**
* Endpoint to fetch spend data (proxy to billing service).
*/
-export const BillingSpendRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const BillingSpendRetrieveQueryParams = () => zod.object({
breakdowns: zod
.string()
.nullish()
@@ -35,7 +35,7 @@ export const BillingSpendRetrieveQueryParams = /* @__PURE__ */ zod.object({
),
})
-export const BillingUsageRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const BillingUsageRetrieveQueryParams = () => zod.object({
breakdowns: zod
.string()
.nullish()
diff --git a/services/mcp/src/generated/billing_alerts/api.ts b/services/mcp/src/generated/billing_alerts/api.ts
index 82b27baa047a..035e9dd7109e 100644
--- a/services/mcp/src/generated/billing_alerts/api.ts
+++ b/services/mcp/src/generated/billing_alerts/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const BillingAlertsCreateParams = /* @__PURE__ */ zod.object({
+export const BillingAlertsCreateParams = () => zod.object({
organization_id: zod
.string()
.describe(
@@ -31,7 +31,7 @@ export const billingAlertsCreateBodyCooldownHoursMax = 720
export const billingAlertsCreateBodyDestinationChangesOneDeleteItemMax = 100
-export const BillingAlertsCreateBody = /* @__PURE__ */ zod.object({
+export const BillingAlertsCreateBody = () => zod.object({
name: zod.string().max(billingAlertsCreateBodyNameMax).describe('Display name for this billing alert.'),
description: zod.string().optional().describe('Optional internal description.'),
enabled: zod.boolean().optional().describe('Whether scheduled checks should evaluate this alert.'),
@@ -120,7 +120,7 @@ export const BillingAlertsCreateBody = /* @__PURE__ */ zod.object({
.describe('Destination groups to create or delete in the same transaction as this configuration write.'),
})
-export const BillingAlertsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const BillingAlertsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this billing alert configuration.'),
organization_id: zod
.string()
@@ -144,7 +144,7 @@ export const billingAlertsPartialUpdateBodyCooldownHoursMax = 720
export const billingAlertsPartialUpdateBodyDestinationChangesOneDeleteItemMax = 100
-export const BillingAlertsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const BillingAlertsPartialUpdateBody = () => zod.object({
name: zod
.string()
.max(billingAlertsPartialUpdateBodyNameMax)
diff --git a/services/mcp/src/generated/business_knowledge/api.ts b/services/mcp/src/generated/business_knowledge/api.ts
index 934487fb302f..767a6ecd4809 100644
--- a/services/mcp/src/generated/business_knowledge/api.ts
+++ b/services/mcp/src/generated/business_knowledge/api.ts
@@ -13,7 +13,7 @@ import * as zod from 'zod'
* (``search``) and a drill-down window (``window``) so an agent (PHAI or
* MCP) can find and explore business knowledge chunks.
*/
-export const BusinessKnowledgeDocumentsWindowListParams = /* @__PURE__ */ zod.object({
+export const BusinessKnowledgeDocumentsWindowListParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this knowledge document.'),
project_id: zod
.string()
@@ -22,7 +22,7 @@ export const BusinessKnowledgeDocumentsWindowListParams = /* @__PURE__ */ zod.ob
),
})
-export const BusinessKnowledgeDocumentsWindowListQueryParams = /* @__PURE__ */ zod.object({
+export const BusinessKnowledgeDocumentsWindowListQueryParams = () => zod.object({
around_ordinal: zod.number().describe('Zero-based chunk ordinal to center the window on (from a search result).'),
radius: zod
.number()
@@ -35,7 +35,7 @@ export const BusinessKnowledgeDocumentsWindowListQueryParams = /* @__PURE__ */ z
* (``search``) and a drill-down window (``window``) so an agent (PHAI or
* MCP) can find and explore business knowledge chunks.
*/
-export const BusinessKnowledgeDocumentsSearchListParams = /* @__PURE__ */ zod.object({
+export const BusinessKnowledgeDocumentsSearchListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -43,7 +43,7 @@ export const BusinessKnowledgeDocumentsSearchListParams = /* @__PURE__ */ zod.ob
),
})
-export const BusinessKnowledgeDocumentsSearchListQueryParams = /* @__PURE__ */ zod.object({
+export const BusinessKnowledgeDocumentsSearchListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Maximum number of ranked chunks to return. Defaults to 10, capped at 20.'),
query: zod
.string()
@@ -58,7 +58,7 @@ export const BusinessKnowledgeDocumentsSearchListQueryParams = /* @__PURE__ */ z
),
})
-export const BusinessKnowledgeSourcesListParams = /* @__PURE__ */ zod.object({
+export const BusinessKnowledgeSourcesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -66,12 +66,12 @@ export const BusinessKnowledgeSourcesListParams = /* @__PURE__ */ zod.object({
),
})
-export const BusinessKnowledgeSourcesListQueryParams = /* @__PURE__ */ zod.object({
+export const BusinessKnowledgeSourcesListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const BusinessKnowledgeSourcesCreateParams = /* @__PURE__ */ zod.object({
+export const BusinessKnowledgeSourcesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -83,7 +83,7 @@ export const businessKnowledgeSourcesCreateBodyNameMax = 255
export const businessKnowledgeSourcesCreateBodyAlwaysIncludeDefault = false
-export const BusinessKnowledgeSourcesCreateBody = /* @__PURE__ */ zod.object({
+export const BusinessKnowledgeSourcesCreateBody = () => zod.object({
name: zod
.string()
.max(businessKnowledgeSourcesCreateBodyNameMax)
@@ -101,7 +101,7 @@ export const BusinessKnowledgeSourcesCreateBody = /* @__PURE__ */ zod.object({
),
})
-export const BusinessKnowledgeSourcesRetrieveParams = /* @__PURE__ */ zod.object({
+export const BusinessKnowledgeSourcesRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this knowledge source.'),
project_id: zod
.string()
@@ -110,7 +110,7 @@ export const BusinessKnowledgeSourcesRetrieveParams = /* @__PURE__ */ zod.object
),
})
-export const BusinessKnowledgeSourcesPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const BusinessKnowledgeSourcesPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this knowledge source.'),
project_id: zod
.string()
@@ -121,7 +121,7 @@ export const BusinessKnowledgeSourcesPartialUpdateParams = /* @__PURE__ */ zod.o
export const businessKnowledgeSourcesPartialUpdateBodyNameMax = 255
-export const BusinessKnowledgeSourcesPartialUpdateBody = /* @__PURE__ */ zod
+export const BusinessKnowledgeSourcesPartialUpdateBody = () => zod
.object({
name: zod
.string()
diff --git a/services/mcp/src/generated/canvas/api.ts b/services/mcp/src/generated/canvas/api.ts
index 3ca225bfa99e..5f31945f30bb 100644
--- a/services/mcp/src/generated/canvas/api.ts
+++ b/services/mcp/src/generated/canvas/api.ts
@@ -14,7 +14,7 @@ import * as zod from 'zod'
* Source is versioned per publish and built server-side; the canvas app
* renders the published build's artifact from the isolated artifact origin.
*/
-export const CanvasesListParams = /* @__PURE__ */ zod.object({
+export const CanvasesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -22,7 +22,7 @@ export const CanvasesListParams = /* @__PURE__ */ zod.object({
),
})
-export const CanvasesListQueryParams = /* @__PURE__ */ zod.object({
+export const CanvasesListQueryParams = () => zod.object({
channel: zod.string().optional().describe('Only return canvases in this channel.'),
kind: zod
.enum(['component', 'freeform', 'grid'])
@@ -39,7 +39,7 @@ export const CanvasesListQueryParams = /* @__PURE__ */ zod.object({
/**
* Create a new, empty canvas in a channel; give it source by publishing a project.
*/
-export const CanvasesCreateParams = /* @__PURE__ */ zod.object({
+export const CanvasesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -54,7 +54,7 @@ export const canvasesCreateBodyDescriptionDefault = ``
export const canvasesCreateBodyTemplateIdDefault = `freeform`
export const canvasesCreateBodyTemplateIdMax = 64
-export const CanvasesCreateBody = /* @__PURE__ */ zod
+export const CanvasesCreateBody = () => zod
.object({
name: zod.string().max(canvasesCreateBodyNameMax).describe('Display name for the canvas.'),
channel_id: zod.string().describe('Id of the channel the canvas belongs to.'),
@@ -86,7 +86,7 @@ export const CanvasesCreateBody = /* @__PURE__ */ zod
* advances) or failed (fix the error diagnostics and publish again — the
* last good build stays live).
*/
-export const CanvasesBuildsRetrieveParams = /* @__PURE__ */ zod.object({
+export const CanvasesBuildsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this canvas.'),
project_id: zod
.string()
@@ -95,7 +95,7 @@ export const CanvasesBuildsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const CanvasesBuildsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const CanvasesBuildsRetrieveQueryParams = () => zod.object({
version_id: zod
.string()
.optional()
@@ -112,7 +112,7 @@ export const CanvasesBuildsRetrieveQueryParams = /* @__PURE__ */ zod.object({
* current head's, so growth in access can be reviewed before it ships.
* No version guard applies: a draft conflicts with nothing.
*/
-export const CanvasesDraftCreateParams = /* @__PURE__ */ zod.object({
+export const CanvasesDraftCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this canvas.'),
project_id: zod
.string()
@@ -157,7 +157,7 @@ export const canvasesDraftCreateBodyProjectOneCapabilitiesOneNetworkOriginsItemM
export const canvasesDraftCreateBodyProjectOneCapabilitiesOneNetworkOriginsMax = 20
-export const CanvasesDraftCreateBody = /* @__PURE__ */ zod
+export const CanvasesDraftCreateBody = () => zod
.object({
project: zod
.object({
@@ -325,7 +325,7 @@ export const CanvasesDraftCreateBody = /* @__PURE__ */ zod
* A draft is a version that was built but never made the head. Preview one
* with `source?version_id=`, then make it live with `promote`.
*/
-export const CanvasesDraftsRetrieveParams = /* @__PURE__ */ zod.object({
+export const CanvasesDraftsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this canvas.'),
project_id: zod
.string()
@@ -334,7 +334,7 @@ export const CanvasesDraftsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const CanvasesDraftsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const CanvasesDraftsRetrieveQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
@@ -348,7 +348,7 @@ export const CanvasesDraftsRetrieveQueryParams = /* @__PURE__ */ zod.object({
* relative edits against an unverified base could silently merge into
* someone else's newer work.
*/
-export const CanvasesEditCreateParams = /* @__PURE__ */ zod.object({
+export const CanvasesEditCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this canvas.'),
project_id: zod
.string()
@@ -359,7 +359,7 @@ export const CanvasesEditCreateParams = /* @__PURE__ */ zod.object({
export const canvasesEditCreateBodyNameMax = 400
-export const CanvasesEditCreateBody = /* @__PURE__ */ zod
+export const CanvasesEditCreateBody = () => zod
.object({
operations: zod
.array(
@@ -404,7 +404,7 @@ export const CanvasesEditCreateBody = /* @__PURE__ */ zod
* not overwritten. A grid canvas with no versions yet returns the
* default empty layout with a null version id.
*/
-export const CanvasesLayoutRetrieveParams = /* @__PURE__ */ zod.object({
+export const CanvasesLayoutRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this canvas.'),
project_id: zod
.string()
@@ -413,7 +413,7 @@ export const CanvasesLayoutRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const CanvasesLayoutRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const CanvasesLayoutRetrieveQueryParams = () => zod.object({
version_id: zod
.string()
.optional()
@@ -428,7 +428,7 @@ export const CanvasesLayoutRetrieveQueryParams = /* @__PURE__ */ zod.object({
* `expected_current_version_id` is mandatory so an agent filling a box
* and a user rearranging widgets cannot overwrite each other.
*/
-export const CanvasesLayoutPatchCreateParams = /* @__PURE__ */ zod.object({
+export const CanvasesLayoutPatchCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this canvas.'),
project_id: zod
.string()
@@ -460,7 +460,7 @@ export const canvasesLayoutPatchCreateBodyOperationsItemChangesOneYMin = 0
export const canvasesLayoutPatchCreateBodyOperationsItemChangesOnePromptMax = 10000
-export const CanvasesLayoutPatchCreateBody = /* @__PURE__ */ zod
+export const CanvasesLayoutPatchCreateBody = () => zod
.object({
operations: zod
.array(
@@ -651,7 +651,7 @@ export const CanvasesLayoutPatchCreateBody = /* @__PURE__ */ zod
* build. Validation errors reject the publish (400) and leave the canvas
* untouched; a stale `expected_current_version_id` is rejected with 409.
*/
-export const CanvasesLayoutPublishCreateParams = /* @__PURE__ */ zod.object({
+export const CanvasesLayoutPublishCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this canvas.'),
project_id: zod
.string()
@@ -675,7 +675,7 @@ export const canvasesLayoutPublishCreateBodyLayoutOnePlacementsItemYMin = 0
export const canvasesLayoutPublishCreateBodyLayoutOnePlacementsItemPromptMax = 10000
-export const CanvasesLayoutPublishCreateBody = /* @__PURE__ */ zod
+export const CanvasesLayoutPublishCreateBody = () => zod
.object({
layout: zod
.object({
@@ -790,7 +790,7 @@ export const CanvasesLayoutPublishCreateBody = /* @__PURE__ */ zod
* A draft whose build is ready goes live immediately, with no rebuild;
* otherwise a fresh build is queued. Returns that build.
*/
-export const CanvasesPromoteCreateParams = /* @__PURE__ */ zod.object({
+export const CanvasesPromoteCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this canvas.'),
project_id: zod
.string()
@@ -799,7 +799,7 @@ export const CanvasesPromoteCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const CanvasesPromoteCreateBody = /* @__PURE__ */ zod
+export const CanvasesPromoteCreateBody = () => zod
.object({
version_id: zod.string().describe('Id of the draft source version to make live.'),
expected_current_version_id: zod
@@ -818,7 +818,7 @@ export const CanvasesPromoteCreateBody = /* @__PURE__ */ zod
* untouched; a stale `expected_current_version_id` is rejected with 409.
* A successful publish queues a server-side build.
*/
-export const CanvasesPublishCreateParams = /* @__PURE__ */ zod.object({
+export const CanvasesPublishCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this canvas.'),
project_id: zod
.string()
@@ -865,7 +865,7 @@ export const canvasesPublishCreateBodyProjectOneCapabilitiesOneNetworkOriginsMax
export const canvasesPublishCreateBodyNameMax = 400
-export const CanvasesPublishCreateBody = /* @__PURE__ */ zod
+export const CanvasesPublishCreateBody = () => zod
.object({
project: zod
.object({
@@ -1043,7 +1043,7 @@ export const CanvasesPublishCreateBody = /* @__PURE__ */ zod
/**
* Queue a build for the current source version without changing source or metadata.
*/
-export const CanvasesPublishCurrentVersionCreateParams = /* @__PURE__ */ zod.object({
+export const CanvasesPublishCurrentVersionCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this canvas.'),
project_id: zod
.string()
@@ -1052,7 +1052,7 @@ export const CanvasesPublishCurrentVersionCreateParams = /* @__PURE__ */ zod.obj
),
})
-export const CanvasesPublishCurrentVersionCreateBody = /* @__PURE__ */ zod.object({
+export const CanvasesPublishCurrentVersionCreateBody = () => zod.object({
expected_current_version_id: zod
.string()
.describe('Current source version to publish. A changed head returns a 409 version_conflict.'),
@@ -1066,7 +1066,7 @@ export const CanvasesPublishCurrentVersionCreateBody = /* @__PURE__ */ zod.objec
* `expected_current_version_id` so concurrent edits are not overwritten.
* `?version_id=` reads a historical version instead of the head.
*/
-export const CanvasesSourceRetrieveParams = /* @__PURE__ */ zod.object({
+export const CanvasesSourceRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this canvas.'),
project_id: zod
.string()
@@ -1075,7 +1075,7 @@ export const CanvasesSourceRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const CanvasesSourceRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const CanvasesSourceRetrieveQueryParams = () => zod.object({
version_id: zod
.string()
.optional()
@@ -1088,7 +1088,7 @@ export const CanvasesSourceRetrieveQueryParams = /* @__PURE__ */ zod.object({
* Returns shared entries plus the authenticated user's own user-scoped
* entries — never another user's.
*/
-export const CanvasesStateRetrieveParams = /* @__PURE__ */ zod.object({
+export const CanvasesStateRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this canvas.'),
project_id: zod
.string()
@@ -1097,14 +1097,14 @@ export const CanvasesStateRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const CanvasesStateRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const CanvasesStateRetrieveQueryParams = () => zod.object({
scope: zod.enum(['shared', 'user']).optional().describe('Only return entries in this scope.'),
})
/**
* Write one key of the canvas's runtime state, or delete it with a null value.
*/
-export const CanvasesStateSetParams = /* @__PURE__ */ zod.object({
+export const CanvasesStateSetParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this canvas.'),
project_id: zod
.string()
@@ -1115,7 +1115,7 @@ export const CanvasesStateSetParams = /* @__PURE__ */ zod.object({
export const canvasesStateSetBodyKeyMax = 200
-export const CanvasesStateSetBody = /* @__PURE__ */ zod
+export const CanvasesStateSetBody = () => zod
.object({
scope: zod
.enum(['user', 'shared'])
@@ -1131,7 +1131,7 @@ export const CanvasesStateSetBody = /* @__PURE__ */ zod
/**
* Validate a candidate source project without publishing it. Side-effect free.
*/
-export const CanvasesValidateCreateParams = /* @__PURE__ */ zod.object({
+export const CanvasesValidateCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this canvas.'),
project_id: zod
.string()
@@ -1176,7 +1176,7 @@ export const canvasesValidateCreateBodyProjectOneCapabilitiesOneNetworkOriginsIt
export const canvasesValidateCreateBodyProjectOneCapabilitiesOneNetworkOriginsMax = 20
-export const CanvasesValidateCreateBody = /* @__PURE__ */ zod
+export const CanvasesValidateCreateBody = () => zod
.object({
project: zod
.object({
diff --git a/services/mcp/src/generated/cdp_function_templates/api.ts b/services/mcp/src/generated/cdp_function_templates/api.ts
index 4e2e259c8107..7ffcf496bae2 100644
--- a/services/mcp/src/generated/cdp_function_templates/api.ts
+++ b/services/mcp/src/generated/cdp_function_templates/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const HogFunctionTemplatesListParams = /* @__PURE__ */ zod.object({
+export const HogFunctionTemplatesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,7 +16,7 @@ export const HogFunctionTemplatesListParams = /* @__PURE__ */ zod.object({
),
})
-export const HogFunctionTemplatesListQueryParams = /* @__PURE__ */ zod.object({
+export const HogFunctionTemplatesListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
template_id: zod
@@ -37,7 +37,7 @@ export const HogFunctionTemplatesListQueryParams = /* @__PURE__ */ zod.object({
.describe('Comma-separated list of template types to include (e.g. destination,email,sms_provider).'),
})
-export const HogFunctionTemplatesRetrieveParams = /* @__PURE__ */ zod.object({
+export const HogFunctionTemplatesRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
diff --git a/services/mcp/src/generated/cdp_functions/api.ts b/services/mcp/src/generated/cdp_functions/api.ts
index f68506dd6d6c..2659a4b308f9 100644
--- a/services/mcp/src/generated/cdp_functions/api.ts
+++ b/services/mcp/src/generated/cdp_functions/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const HogFunctionsListParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,7 +16,7 @@ export const HogFunctionsListParams = /* @__PURE__ */ zod.object({
),
})
-export const HogFunctionsListQueryParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsListQueryParams = () => zod.object({
created_at: zod.iso.datetime({ offset: true }).optional(),
created_by: zod.number().optional(),
enabled: zod.boolean().optional(),
@@ -27,7 +27,7 @@ export const HogFunctionsListQueryParams = /* @__PURE__ */ zod.object({
updated_at: zod.iso.datetime({ offset: true }).optional(),
})
-export const HogFunctionsCreateParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -53,7 +53,7 @@ export const hogFunctionsCreateBodyTemplateIdMax = 400
export const hogFunctionsCreateBodyExecutionOrderMin = 0
export const hogFunctionsCreateBodyExecutionOrderMax = 32767
-export const HogFunctionsCreateBody = /* @__PURE__ */ zod.object({
+export const HogFunctionsCreateBody = () => zod.object({
type: zod
.union([
zod
@@ -278,7 +278,7 @@ export const HogFunctionsCreateBody = /* @__PURE__ */ zod.object({
.describe('Execution priority for transformations. Lower values run first.'),
})
-export const HogFunctionsRetrieveParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog function.'),
project_id: zod
.string()
@@ -287,7 +287,7 @@ export const HogFunctionsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const HogFunctionsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog function.'),
project_id: zod
.string()
@@ -314,7 +314,7 @@ export const hogFunctionsPartialUpdateBodyTemplateIdMax = 400
export const hogFunctionsPartialUpdateBodyExecutionOrderMin = 0
export const hogFunctionsPartialUpdateBodyExecutionOrderMax = 32767
-export const HogFunctionsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const HogFunctionsPartialUpdateBody = () => zod.object({
type: zod
.union([
zod
@@ -548,7 +548,7 @@ export const HogFunctionsPartialUpdateBody = /* @__PURE__ */ zod.object({
/**
* Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
*/
-export const HogFunctionsDestroyParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog function.'),
project_id: zod
.string()
@@ -557,7 +557,7 @@ export const HogFunctionsDestroyParams = /* @__PURE__ */ zod.object({
),
})
-export const HogFunctionsDiscardDraftCreateParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsDiscardDraftCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog function.'),
project_id: zod
.string()
@@ -566,7 +566,7 @@ export const HogFunctionsDiscardDraftCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const HogFunctionsInvocationsCreateParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsInvocationsCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog function.'),
project_id: zod
.string()
@@ -612,7 +612,7 @@ export const hogFunctionsInvocationsCreateBodyConfigurationOneExecutionOrderMax
export const hogFunctionsInvocationsCreateBodyUseDraftDefault = false
export const hogFunctionsInvocationsCreateBodyMockAsyncFunctionsDefault = true
-export const HogFunctionsInvocationsCreateBody = /* @__PURE__ */ zod.object({
+export const HogFunctionsInvocationsCreateBody = () => zod.object({
configuration: zod
.object({
id: zod.string().optional(),
@@ -1059,7 +1059,7 @@ export const HogFunctionsInvocationsCreateBody = /* @__PURE__ */ zod.object({
invocation_id: zod.string().nullish().describe('Optional invocation ID for correlation.'),
})
-export const HogFunctionsLogsRetrieveParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsLogsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog function.'),
project_id: zod
.string()
@@ -1071,7 +1071,7 @@ export const HogFunctionsLogsRetrieveParams = /* @__PURE__ */ zod.object({
export const hogFunctionsLogsRetrieveQueryLimitDefault = 50
export const hogFunctionsLogsRetrieveQueryLimitMax = 500
-export const HogFunctionsLogsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsLogsRetrieveQueryParams = () => zod.object({
after: zod.iso
.datetime({ offset: true })
.optional()
@@ -1099,7 +1099,7 @@ export const HogFunctionsLogsRetrieveQueryParams = /* @__PURE__ */ zod.object({
search: zod.string().min(1).optional().describe('Case-insensitive substring search across log messages.'),
})
-export const HogFunctionsMetricsRetrieveParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsMetricsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog function.'),
project_id: zod
.string()
@@ -1113,7 +1113,7 @@ export const hogFunctionsMetricsRetrieveQueryAfterDefault = `-7d`
export const hogFunctionsMetricsRetrieveQueryBreakdownByDefault = `kind`
export const hogFunctionsMetricsRetrieveQueryIntervalDefault = `day`
-export const HogFunctionsMetricsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsMetricsRetrieveQueryParams = () => zod.object({
after: zod
.string()
.min(1)
@@ -1139,7 +1139,7 @@ export const HogFunctionsMetricsRetrieveQueryParams = /* @__PURE__ */ zod.object
name: zod.string().min(1).optional().describe('Comma-separated metric names to filter by.'),
})
-export const HogFunctionsPublishCreateParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsPublishCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog function.'),
project_id: zod
.string()
@@ -1150,7 +1150,7 @@ export const HogFunctionsPublishCreateParams = /* @__PURE__ */ zod.object({
export const hogFunctionsPublishCreateBodyConfirmDefault = false
-export const HogFunctionsPublishCreateBody = /* @__PURE__ */ zod.object({
+export const HogFunctionsPublishCreateBody = () => zod.object({
confirm: zod
.boolean()
.default(hogFunctionsPublishCreateBodyConfirmDefault)
@@ -1165,7 +1165,7 @@ export const HogFunctionsPublishCreateBody = /* @__PURE__ */ zod.object({
),
})
-export const HogFunctionsRevisionsListParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsRevisionsListParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog function.'),
project_id: zod
.string()
@@ -1174,12 +1174,12 @@ export const HogFunctionsRevisionsListParams = /* @__PURE__ */ zod.object({
),
})
-export const HogFunctionsRevisionsListQueryParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsRevisionsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const HogFunctionsRevisionsRetrieveParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsRevisionsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog function.'),
project_id: zod
.string()
@@ -1189,7 +1189,7 @@ export const HogFunctionsRevisionsRetrieveParams = /* @__PURE__ */ zod.object({
version: zod.number().describe('Function version to fetch.'),
})
-export const HogFunctionsRevisionsRestoreCreateParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsRevisionsRestoreCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog function.'),
project_id: zod
.string()
@@ -1201,7 +1201,7 @@ export const HogFunctionsRevisionsRestoreCreateParams = /* @__PURE__ */ zod.obje
export const hogFunctionsRevisionsRestoreCreateBodyOverwriteDefault = false
-export const HogFunctionsRevisionsRestoreCreateBody = /* @__PURE__ */ zod.object({
+export const HogFunctionsRevisionsRestoreCreateBody = () => zod.object({
overwrite: zod
.boolean()
.default(hogFunctionsRevisionsRestoreCreateBodyOverwriteDefault)
@@ -1213,7 +1213,7 @@ export const HogFunctionsRevisionsRestoreCreateBody = /* @__PURE__ */ zod.object
/**
* Update the execution order of multiple HogFunctions.
*/
-export const HogFunctionsRearrangePartialUpdateParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsRearrangePartialUpdateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1221,7 +1221,7 @@ export const HogFunctionsRearrangePartialUpdateParams = /* @__PURE__ */ zod.obje
),
})
-export const HogFunctionsRearrangePartialUpdateBody = /* @__PURE__ */ zod.object({
+export const HogFunctionsRearrangePartialUpdateBody = () => zod.object({
orders: zod
.record(zod.string(), zod.number())
.optional()
diff --git a/services/mcp/src/generated/cohorts/api.ts b/services/mcp/src/generated/cohorts/api.ts
index 412f1cb9ee7a..2d3956f4862c 100644
--- a/services/mcp/src/generated/cohorts/api.ts
+++ b/services/mcp/src/generated/cohorts/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const CohortsListParams = /* @__PURE__ */ zod.object({
+export const CohortsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,7 +16,7 @@ export const CohortsListParams = /* @__PURE__ */ zod.object({
),
})
-export const CohortsListQueryParams = /* @__PURE__ */ zod.object({
+export const CohortsListQueryParams = () => zod.object({
basic: zod
.boolean()
.optional()
@@ -39,7 +39,7 @@ export const CohortsListQueryParams = /* @__PURE__ */ zod.object({
),
})
-export const CohortsCreateParams = /* @__PURE__ */ zod.object({
+export const CohortsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -57,7 +57,7 @@ export const cohortsCreateBodyFiltersOnePropertiesValuesItemThreeNegationDefault
export const cohortsCreateBodyFiltersOnePropertiesValuesItemFourNegationDefault = false
export const cohortsCreateBodyCreateStaticPersonIdsDefault = []
-export const CohortsCreateBody = /* @__PURE__ */ zod.object({
+export const CohortsCreateBody = () => zod.object({
name: zod.string().max(cohortsCreateBodyNameMax).nullish(),
description: zod.string().max(cohortsCreateBodyDescriptionMax).optional(),
filters: zod
@@ -185,7 +185,7 @@ export const CohortsCreateBody = /* @__PURE__ */ zod.object({
_create_static_person_ids: zod.array(zod.string()).default(cohortsCreateBodyCreateStaticPersonIdsDefault),
})
-export const CohortsRetrieveParams = /* @__PURE__ */ zod.object({
+export const CohortsRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this cohort.'),
project_id: zod
.string()
@@ -194,7 +194,7 @@ export const CohortsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const CohortsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const CohortsPartialUpdateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this cohort.'),
project_id: zod
.string()
@@ -212,7 +212,7 @@ export const cohortsPartialUpdateBodyFiltersOnePropertiesValuesItemTwoNegationDe
export const cohortsPartialUpdateBodyFiltersOnePropertiesValuesItemThreeNegationDefault = false
export const cohortsPartialUpdateBodyFiltersOnePropertiesValuesItemFourNegationDefault = false
-export const CohortsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const CohortsPartialUpdateBody = () => zod.object({
name: zod.string().max(cohortsPartialUpdateBodyNameMax).nullish(),
description: zod.string().max(cohortsPartialUpdateBodyDescriptionMax).optional(),
deleted: zod.boolean().optional(),
@@ -347,7 +347,7 @@ export const CohortsPartialUpdateBody = /* @__PURE__ */ zod.object({
_create_static_person_ids: zod.array(zod.string()).optional(),
})
-export const CohortsAddPersonsToStaticCohortPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const CohortsAddPersonsToStaticCohortPartialUpdateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this cohort.'),
project_id: zod
.string()
@@ -356,11 +356,11 @@ export const CohortsAddPersonsToStaticCohortPartialUpdateParams = /* @__PURE__ *
),
})
-export const CohortsAddPersonsToStaticCohortPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const CohortsAddPersonsToStaticCohortPartialUpdateBody = () => zod.object({
person_ids: zod.array(zod.string()).optional().describe('List of person UUIDs to add to the cohort'),
})
-export const CohortsRemovePersonFromStaticCohortPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const CohortsRemovePersonFromStaticCohortPartialUpdateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this cohort.'),
project_id: zod
.string()
@@ -369,6 +369,6 @@ export const CohortsRemovePersonFromStaticCohortPartialUpdateParams = /* @__PURE
),
})
-export const CohortsRemovePersonFromStaticCohortPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const CohortsRemovePersonFromStaticCohortPartialUpdateBody = () => zod.object({
person_id: zod.string().optional().describe('Person UUID to remove from the cohort'),
})
diff --git a/services/mcp/src/generated/context_layer/api.ts b/services/mcp/src/generated/context_layer/api.ts
index cfec8d604cf5..8b3e811b6372 100644
--- a/services/mcp/src/generated/context_layer/api.ts
+++ b/services/mcp/src/generated/context_layer/api.ts
@@ -12,7 +12,7 @@ import * as zod from 'zod'
* The channel's page path. When the channel has no page yet, responds with the canonical path to create it at and `exists: false`.
* @summary Resolve a channel's wiki page
*/
-export const ContextLayerAgentChannelPagesRetrieveParams = /* @__PURE__ */ zod.object({
+export const ContextLayerAgentChannelPagesRetrieveParams = () => zod.object({
channel_id: zod.string(),
project_id: zod
.string()
@@ -32,7 +32,7 @@ export const ContextLayerAgentChannelPagesRetrieveParams = /* @__PURE__ */ zod.o
* organization it may act for, and is not a scope on the wiki itself.
* @summary Read a wiki page
*/
-export const ContextLayerAgentPagesRetrieveParams = /* @__PURE__ */ zod.object({
+export const ContextLayerAgentPagesRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -40,7 +40,7 @@ export const ContextLayerAgentPagesRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const ContextLayerAgentPagesRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const ContextLayerAgentPagesRetrieveQueryParams = () => zod.object({
path: zod.string().describe('Repo-relative Markdown path of the page to read.'),
})
@@ -55,7 +55,7 @@ export const ContextLayerAgentPagesRetrieveQueryParams = /* @__PURE__ */ zod.obj
* organization it may act for, and is not a scope on the wiki itself.
* @summary Create or replace a wiki page
*/
-export const ContextLayerAgentPagesUpdateParams = /* @__PURE__ */ zod.object({
+export const ContextLayerAgentPagesUpdateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -67,7 +67,7 @@ export const contextLayerAgentPagesUpdateBodyPathMax = 512
export const contextLayerAgentPagesUpdateBodyContentMax = 1000000
-export const ContextLayerAgentPagesUpdateBody = /* @__PURE__ */ zod
+export const ContextLayerAgentPagesUpdateBody = () => zod
.object({
path: zod
.string()
diff --git a/services/mcp/src/generated/conversations/api.ts b/services/mcp/src/generated/conversations/api.ts
index 3c4a72d87a71..dfdc6a620d2a 100644
--- a/services/mcp/src/generated/conversations/api.ts
+++ b/services/mcp/src/generated/conversations/api.ts
@@ -11,7 +11,7 @@ import * as zod from 'zod'
/**
* List tickets with person data attached.
*/
-export const ConversationsTicketsListParams = /* @__PURE__ */ zod.object({
+export const ConversationsTicketsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -19,7 +19,7 @@ export const ConversationsTicketsListParams = /* @__PURE__ */ zod.object({
),
})
-export const ConversationsTicketsListQueryParams = /* @__PURE__ */ zod.object({
+export const ConversationsTicketsListQueryParams = () => zod.object({
ai_triage_result: zod
.string()
.optional()
@@ -132,7 +132,7 @@ export const ConversationsTicketsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Get single ticket and mark as read by team.
*/
-export const ConversationsTicketsRetrieveParams = /* @__PURE__ */ zod.object({
+export const ConversationsTicketsRetrieveParams = () => zod.object({
id: zod.string().describe("The ticket's UUID or its numeric ticket number."),
project_id: zod
.string()
@@ -141,7 +141,7 @@ export const ConversationsTicketsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const ConversationsTicketsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const ConversationsTicketsPartialUpdateParams = () => zod.object({
id: zod.string().describe("The ticket's UUID or its numeric ticket number."),
project_id: zod
.string()
@@ -150,7 +150,7 @@ export const ConversationsTicketsPartialUpdateParams = /* @__PURE__ */ zod.objec
),
})
-export const ConversationsTicketsPartialUpdateBody = /* @__PURE__ */ zod
+export const ConversationsTicketsPartialUpdateBody = () => zod
.object({
status: zod
.enum(['new', 'open', 'pending', 'on_hold', 'resolved'])
@@ -201,7 +201,7 @@ export const ConversationsTicketsPartialUpdateBody = /* @__PURE__ */ zod
/**
* Return the message thread for a ticket, ordered chronologically (paginated).
*/
-export const ConversationsTicketsMessagesListParams = /* @__PURE__ */ zod.object({
+export const ConversationsTicketsMessagesListParams = () => zod.object({
id: zod.string().describe("The ticket's UUID or its numeric ticket number."),
project_id: zod
.string()
@@ -210,7 +210,7 @@ export const ConversationsTicketsMessagesListParams = /* @__PURE__ */ zod.object
),
})
-export const ConversationsTicketsMessagesListQueryParams = /* @__PURE__ */ zod.object({
+export const ConversationsTicketsMessagesListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
@@ -221,7 +221,7 @@ export const ConversationsTicketsMessagesListQueryParams = /* @__PURE__ */ zod.o
* Only the note's author can edit it. Customer-facing replies cannot be
* edited (outbound delivery only runs on create).
*/
-export const ConversationsTicketsNotesPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const ConversationsTicketsNotesPartialUpdateParams = () => zod.object({
id: zod.string().describe("The ticket's UUID or its numeric ticket number."),
message_id: zod.string().describe('The UUID of the private note (comment) to edit or delete.'),
project_id: zod
@@ -233,7 +233,7 @@ export const ConversationsTicketsNotesPartialUpdateParams = /* @__PURE__ */ zod.
export const conversationsTicketsNotesPartialUpdateBodyMessageMax = 5000
-export const ConversationsTicketsNotesPartialUpdateBody = /* @__PURE__ */ zod
+export const ConversationsTicketsNotesPartialUpdateBody = () => zod
.object({
message: zod
.string()
@@ -255,7 +255,7 @@ export const ConversationsTicketsNotesPartialUpdateBody = /* @__PURE__ */ zod
* Only the note's author can delete it. Customer-facing replies cannot be
* deleted via this endpoint.
*/
-export const ConversationsTicketsNotesDestroyParams = /* @__PURE__ */ zod.object({
+export const ConversationsTicketsNotesDestroyParams = () => zod.object({
id: zod.string().describe("The ticket's UUID or its numeric ticket number."),
message_id: zod.string().describe('The UUID of the private note (comment) to edit or delete.'),
project_id: zod
@@ -276,7 +276,7 @@ export const ConversationsTicketsNotesDestroyParams = /* @__PURE__ */ zod.object
* original message with a 200 rather than posting it twice, and a 409 while a concurrent
* request is still creating it.
*/
-export const ConversationsTicketsReplyCreateParams = /* @__PURE__ */ zod.object({
+export const ConversationsTicketsReplyCreateParams = () => zod.object({
id: zod.string().describe("The ticket's UUID or its numeric ticket number."),
project_id: zod
.string()
@@ -289,7 +289,7 @@ export const conversationsTicketsReplyCreateBodyMessageMax = 5000
export const conversationsTicketsReplyCreateBodyIsPrivateDefault = false
-export const ConversationsTicketsReplyCreateBody = /* @__PURE__ */ zod
+export const ConversationsTicketsReplyCreateBody = () => zod
.object({
message: zod.string().max(conversationsTicketsReplyCreateBodyMessageMax).describe('Reply content in markdown.'),
is_private: zod
@@ -302,7 +302,7 @@ export const ConversationsTicketsReplyCreateBody = /* @__PURE__ */ zod
})
.describe('Payload for posting a reply or internal note to a ticket.')
-export const ConversationsViewsListParams = /* @__PURE__ */ zod.object({
+export const ConversationsViewsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -310,7 +310,7 @@ export const ConversationsViewsListParams = /* @__PURE__ */ zod.object({
),
})
-export const ConversationsViewsListQueryParams = /* @__PURE__ */ zod.object({
+export const ConversationsViewsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
diff --git a/services/mcp/src/generated/core/api.ts b/services/mcp/src/generated/core/api.ts
index d640f39b253c..c02d8700590f 100644
--- a/services/mcp/src/generated/core/api.ts
+++ b/services/mcp/src/generated/core/api.ts
@@ -14,7 +14,7 @@ import * as zod from 'zod'
export const organizationsProjectsRetrievePathIdMin = -2147483648
export const organizationsProjectsRetrievePathIdMax = 2147483647
-export const OrganizationsProjectsRetrieveParams = /* @__PURE__ */ zod.object({
+export const OrganizationsProjectsRetrieveParams = () => zod.object({
id: zod
.number()
.min(organizationsProjectsRetrievePathIdMin)
@@ -33,7 +33,7 @@ export const OrganizationsProjectsRetrieveParams = /* @__PURE__ */ zod.object({
export const organizationsProjectsPartialUpdatePathIdMin = -2147483648
export const organizationsProjectsPartialUpdatePathIdMax = 2147483647
-export const OrganizationsProjectsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const OrganizationsProjectsPartialUpdateParams = () => zod.object({
id: zod
.number()
.min(organizationsProjectsPartialUpdatePathIdMin)
@@ -96,7 +96,7 @@ export const organizationsProjectsPartialUpdateBodyMarketingAnalyticsConfigAttri
export const organizationsProjectsPartialUpdateBodyDefaultDataThemeMin = -2147483648
export const organizationsProjectsPartialUpdateBodyDefaultDataThemeMax = 2147483647
-export const OrganizationsProjectsPartialUpdateBody = /* @__PURE__ */ zod
+export const OrganizationsProjectsPartialUpdateBody = () => zod
.object({
name: zod
.string()
@@ -2650,7 +2650,7 @@ export const OrganizationsProjectsPartialUpdateBody = /* @__PURE__ */ zod
})
.describe('Mixin for serializers to add user access control fields')
-export const ProductEnablementCreateParams = /* @__PURE__ */ zod.object({
+export const ProductEnablementCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2658,7 +2658,7 @@ export const ProductEnablementCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const ProductEnablementCreateBody = /* @__PURE__ */ zod.object({
+export const ProductEnablementCreateBody = () => zod.object({
products: zod
.array(
zod
@@ -2674,7 +2674,7 @@ export const ProductEnablementCreateBody = /* @__PURE__ */ zod.object({
/**
* List images in the media library. Requires a `purpose` filter — the library is scoped per consumer (e.g. `email`), so browsing without one would mix in unrelated uploads (dashboard images, toolbar screenshots, ...).
*/
-export const UploadedMediaListParams = /* @__PURE__ */ zod.object({
+export const UploadedMediaListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2682,7 +2682,7 @@ export const UploadedMediaListParams = /* @__PURE__ */ zod.object({
),
})
-export const UploadedMediaListQueryParams = /* @__PURE__ */ zod.object({
+export const UploadedMediaListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
purpose: zod.enum(['email']).describe('The library to list.'),
@@ -2691,7 +2691,7 @@ export const UploadedMediaListQueryParams = /* @__PURE__ */ zod.object({
/**
* Step 2 of the presigned upload flow: verifies the object POSTed to the upload_url, sniffs its real content type, and activates it — after this it appears in the library and is publicly servable.
*/
-export const UploadedMediaCompleteUploadCreateParams = /* @__PURE__ */ zod.object({
+export const UploadedMediaCompleteUploadCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this uploaded media.'),
project_id: zod
.string()
@@ -2703,7 +2703,7 @@ export const UploadedMediaCompleteUploadCreateParams = /* @__PURE__ */ zod.objec
/**
* Step 1 of the presigned upload flow: reserves a pending image and returns a presigned URL to POST the file to directly, bytes never pass through this API. Call complete_upload with the returned id once the upload finishes.
*/
-export const UploadedMediaStartUploadCreateParams = /* @__PURE__ */ zod.object({
+export const UploadedMediaStartUploadCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2715,7 +2715,7 @@ export const uploadedMediaStartUploadCreateBodyNameMax = 1000
export const uploadedMediaStartUploadCreateBodyPurposeMax = 100
-export const UploadedMediaStartUploadCreateBody = /* @__PURE__ */ zod.object({
+export const UploadedMediaStartUploadCreateBody = () => zod.object({
name: zod
.string()
.max(uploadedMediaStartUploadCreateBodyNameMax)
@@ -2729,14 +2729,14 @@ export const UploadedMediaStartUploadCreateBody = /* @__PURE__ */ zod.object({
/**
* Retrieve a user's profile and settings. Pass `@me` as the UUID to fetch the authenticated user; non-staff callers may only access their own account.
*/
-export const UsersRetrieveParams = /* @__PURE__ */ zod.object({
+export const UsersRetrieveParams = () => zod.object({
uuid: zod.string(),
})
/**
* Update one or more of the authenticated user's profile fields or settings.
*/
-export const UsersPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const UsersPartialUpdateParams = () => zod.object({
uuid: zod.string(),
})
@@ -2748,7 +2748,7 @@ export const usersPartialUpdateBodyEmailMax = 254
export const usersPartialUpdateBodyPasswordMax = 128
-export const UsersPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const UsersPartialUpdateBody = () => zod.object({
first_name: zod.string().max(usersPartialUpdateBodyFirstNameMax).optional(),
last_name: zod.string().max(usersPartialUpdateBodyLastNameMax).optional(),
email: zod.email().max(usersPartialUpdateBodyEmailMax).optional(),
diff --git a/services/mcp/src/generated/customer_analytics/api.ts b/services/mcp/src/generated/customer_analytics/api.ts
index 4dd025d3bb77..ac2b65cb30bc 100644
--- a/services/mcp/src/generated/customer_analytics/api.ts
+++ b/services/mcp/src/generated/customer_analytics/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const AccountRelationshipDefinitionsListParams = /* @__PURE__ */ zod.object({
+export const AccountRelationshipDefinitionsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,12 +16,12 @@ export const AccountRelationshipDefinitionsListParams = /* @__PURE__ */ zod.obje
),
})
-export const AccountRelationshipDefinitionsListQueryParams = /* @__PURE__ */ zod.object({
+export const AccountRelationshipDefinitionsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const AccountRelationshipDefinitionsCreateParams = /* @__PURE__ */ zod.object({
+export const AccountRelationshipDefinitionsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -33,7 +33,7 @@ export const accountRelationshipDefinitionsCreateBodyNameMax = 400
export const accountRelationshipDefinitionsCreateBodyIsSingleHolderDefault = true
-export const AccountRelationshipDefinitionsCreateBody = /* @__PURE__ */ zod
+export const AccountRelationshipDefinitionsCreateBody = () => zod
.object({
name: zod
.string()
@@ -54,7 +54,7 @@ export const AccountRelationshipDefinitionsCreateBody = /* @__PURE__ */ zod
})
.describe('A team-defined account relationship type (CSM, Onboarding manager, ...).')
-export const AccountRelationshipDefinitionsRetrieveParams = /* @__PURE__ */ zod.object({
+export const AccountRelationshipDefinitionsRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -63,7 +63,7 @@ export const AccountRelationshipDefinitionsRetrieveParams = /* @__PURE__ */ zod.
),
})
-export const AccountRelationshipDefinitionsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const AccountRelationshipDefinitionsPartialUpdateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -74,7 +74,7 @@ export const AccountRelationshipDefinitionsPartialUpdateParams = /* @__PURE__ */
export const accountRelationshipDefinitionsPartialUpdateBodyNameMax = 400
-export const AccountRelationshipDefinitionsPartialUpdateBody = /* @__PURE__ */ zod
+export const AccountRelationshipDefinitionsPartialUpdateBody = () => zod
.object({
name: zod
.string()
@@ -96,7 +96,7 @@ export const AccountRelationshipDefinitionsPartialUpdateBody = /* @__PURE__ */ z
})
.describe('A team-defined account relationship type (CSM, Onboarding manager, ...).')
-export const AccountRelationshipDefinitionsDestroyParams = /* @__PURE__ */ zod.object({
+export const AccountRelationshipDefinitionsDestroyParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -105,7 +105,7 @@ export const AccountRelationshipDefinitionsDestroyParams = /* @__PURE__ */ zod.o
),
})
-export const AccountsListParams = /* @__PURE__ */ zod.object({
+export const AccountsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -116,7 +116,7 @@ export const AccountsListParams = /* @__PURE__ */ zod.object({
export const accountsListQueryIncludeChurnedDefault = false
export const accountsListQueryIncludeIgnoredDefault = false
-export const AccountsListQueryParams = /* @__PURE__ */ zod.object({
+export const AccountsListQueryParams = () => zod.object({
all_roles_unassigned: zod
.boolean()
.optional()
@@ -141,7 +141,7 @@ export const AccountsListQueryParams = /* @__PURE__ */ zod.object({
),
})
-export const AccountsCreateParams = /* @__PURE__ */ zod.object({
+export const AccountsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -153,7 +153,7 @@ export const accountsCreateBodyNameMax = 400
export const accountsCreateBodyExternalIdMax = 400
-export const AccountsCreateBody = /* @__PURE__ */ zod
+export const AccountsCreateBody = () => zod
.object({
name: zod.string().max(accountsCreateBodyNameMax).describe('Human-readable name of the account.'),
external_id: zod
@@ -214,7 +214,7 @@ export const AccountsCreateBody = /* @__PURE__ */ zod
})
.describe('A Customer Analytics account — a logical grouping used to assign customer-success ownership.')
-export const AccountsCustomPropertyValuesListParams = /* @__PURE__ */ zod.object({
+export const AccountsCustomPropertyValuesListParams = () => zod.object({
account_id: zod.string().describe('UUID of the parent account.'),
project_id: zod
.string()
@@ -223,7 +223,7 @@ export const AccountsCustomPropertyValuesListParams = /* @__PURE__ */ zod.object
),
})
-export const AccountsCustomPropertyValuesCreateParams = /* @__PURE__ */ zod.object({
+export const AccountsCustomPropertyValuesCreateParams = () => zod.object({
account_id: zod.string().describe('UUID of the parent account.'),
project_id: zod
.string()
@@ -232,7 +232,7 @@ export const AccountsCustomPropertyValuesCreateParams = /* @__PURE__ */ zod.obje
),
})
-export const AccountsCustomPropertyValuesCreateBody = /* @__PURE__ */ zod.object({
+export const AccountsCustomPropertyValuesCreateBody = () => zod.object({
definition: zod.string().describe('UUID of the custom property definition whose value to set for this account.'),
value: zod
.union([zod.string(), zod.number(), zod.boolean()])
@@ -241,7 +241,7 @@ export const AccountsCustomPropertyValuesCreateBody = /* @__PURE__ */ zod.object
),
})
-export const AccountsNotebooksListParams = /* @__PURE__ */ zod.object({
+export const AccountsNotebooksListParams = () => zod.object({
account_id: zod.string().describe('UUID of the parent account.'),
project_id: zod
.string()
@@ -250,14 +250,14 @@ export const AccountsNotebooksListParams = /* @__PURE__ */ zod.object({
),
})
-export const AccountsNotebooksListQueryParams = /* @__PURE__ */ zod.object({
+export const AccountsNotebooksListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
ordering: zod.string().optional().describe("Sort by creation date or author. Defaults to '-created_at'."),
search: zod.string().optional().describe('Full-text search across notebook title and content.'),
})
-export const AccountsNotebooksCreateParams = /* @__PURE__ */ zod.object({
+export const AccountsNotebooksCreateParams = () => zod.object({
account_id: zod.string().describe('UUID of the parent account.'),
project_id: zod
.string()
@@ -268,7 +268,7 @@ export const AccountsNotebooksCreateParams = /* @__PURE__ */ zod.object({
export const accountsNotebooksCreateBodyTitleMax = 256
-export const AccountsNotebooksCreateBody = /* @__PURE__ */ zod.object({
+export const AccountsNotebooksCreateBody = () => zod.object({
title: zod
.string()
.max(accountsNotebooksCreateBodyTitleMax)
@@ -278,7 +278,7 @@ export const AccountsNotebooksCreateBody = /* @__PURE__ */ zod.object({
text_content: zod.string().nullish().describe('Plain text representation of the notebook content for search.'),
})
-export const AccountsNotebooksRetrieveParams = /* @__PURE__ */ zod.object({
+export const AccountsNotebooksRetrieveParams = () => zod.object({
account_id: zod.string().describe('UUID of the parent account.'),
project_id: zod
.string()
@@ -288,7 +288,7 @@ export const AccountsNotebooksRetrieveParams = /* @__PURE__ */ zod.object({
short_id: zod.string(),
})
-export const AccountsNotebooksDestroyParams = /* @__PURE__ */ zod.object({
+export const AccountsNotebooksDestroyParams = () => zod.object({
account_id: zod.string().describe('UUID of the parent account.'),
project_id: zod
.string()
@@ -298,7 +298,7 @@ export const AccountsNotebooksDestroyParams = /* @__PURE__ */ zod.object({
short_id: zod.string(),
})
-export const AccountsRelationshipsListParams = /* @__PURE__ */ zod.object({
+export const AccountsRelationshipsListParams = () => zod.object({
account_id: zod.string().describe('UUID of the parent account.'),
project_id: zod
.string()
@@ -307,14 +307,14 @@ export const AccountsRelationshipsListParams = /* @__PURE__ */ zod.object({
),
})
-export const AccountsRelationshipsListQueryParams = /* @__PURE__ */ zod.object({
+export const AccountsRelationshipsListQueryParams = () => zod.object({
include_history: zod
.boolean()
.optional()
.describe('Include ended assignments (the full timeline), not just active ones.'),
})
-export const AccountsRelationshipsCreateParams = /* @__PURE__ */ zod.object({
+export const AccountsRelationshipsCreateParams = () => zod.object({
account_id: zod.string().describe('UUID of the parent account.'),
project_id: zod
.string()
@@ -323,14 +323,14 @@ export const AccountsRelationshipsCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const AccountsRelationshipsCreateBody = /* @__PURE__ */ zod
+export const AccountsRelationshipsCreateBody = () => zod
.object({
definition: zod.string().describe('Id of the relationship definition to assign.'),
user: zod.number().describe("PostHog user id of the assignee. Must be a member of the account's organization."),
})
.describe('Input for assigning a user to an account relationship.')
-export const AccountsRelationshipsEndCreateParams = /* @__PURE__ */ zod.object({
+export const AccountsRelationshipsEndCreateParams = () => zod.object({
account_id: zod.string().describe('UUID of the parent account.'),
id: zod.string(),
project_id: zod
@@ -340,7 +340,7 @@ export const AccountsRelationshipsEndCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const AccountsRetrieveParams = /* @__PURE__ */ zod.object({
+export const AccountsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this account.'),
project_id: zod
.string()
@@ -349,7 +349,7 @@ export const AccountsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const AccountsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const AccountsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this account.'),
project_id: zod
.string()
@@ -362,7 +362,7 @@ export const accountsPartialUpdateBodyNameMax = 400
export const accountsPartialUpdateBodyExternalIdMax = 400
-export const AccountsPartialUpdateBody = /* @__PURE__ */ zod
+export const AccountsPartialUpdateBody = () => zod
.object({
name: zod
.string()
@@ -427,7 +427,7 @@ export const AccountsPartialUpdateBody = /* @__PURE__ */ zod
})
.describe('A Customer Analytics account — a logical grouping used to assign customer-success ownership.')
-export const AccountsDestroyParams = /* @__PURE__ */ zod.object({
+export const AccountsDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this account.'),
project_id: zod
.string()
@@ -436,7 +436,7 @@ export const AccountsDestroyParams = /* @__PURE__ */ zod.object({
),
})
-export const AccountsMeetingsListParams = /* @__PURE__ */ zod.object({
+export const AccountsMeetingsListParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this account.'),
project_id: zod
.string()
@@ -445,13 +445,13 @@ export const AccountsMeetingsListParams = /* @__PURE__ */ zod.object({
),
})
-export const AccountsMeetingsListQueryParams = /* @__PURE__ */ zod.object({
+export const AccountsMeetingsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
search: zod.string().optional().describe('Filter meetings by title or attendee email\/name.'),
})
-export const AccountsSummariesListParams = /* @__PURE__ */ zod.object({
+export const AccountsSummariesListParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this account.'),
project_id: zod
.string()
@@ -460,12 +460,12 @@ export const AccountsSummariesListParams = /* @__PURE__ */ zod.object({
),
})
-export const AccountsSummariesListQueryParams = /* @__PURE__ */ zod.object({
+export const AccountsSummariesListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const AnnouncementsListParams = /* @__PURE__ */ zod.object({
+export const AnnouncementsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -473,12 +473,12 @@ export const AnnouncementsListParams = /* @__PURE__ */ zod.object({
),
})
-export const AnnouncementsListQueryParams = /* @__PURE__ */ zod.object({
+export const AnnouncementsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const AnnouncementsCreateParams = /* @__PURE__ */ zod.object({
+export const AnnouncementsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -486,7 +486,7 @@ export const AnnouncementsCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const AnnouncementsCreateBody = /* @__PURE__ */ zod.object({
+export const AnnouncementsCreateBody = () => zod.object({
message: zod.string().describe('Message body to send, rendered as Slack mrkdwn.'),
channels: zod
.array(zod.string())
@@ -495,7 +495,7 @@ export const AnnouncementsCreateBody = /* @__PURE__ */ zod.object({
),
})
-export const AnnouncementsRetrieveParams = /* @__PURE__ */ zod.object({
+export const AnnouncementsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -507,7 +507,7 @@ export const AnnouncementsRetrieveParams = /* @__PURE__ */ zod.object({
/**
* Slack channels the SupportHog bot can post to, labeled by customer account name.
*/
-export const AnnouncementsChannelsListParams = /* @__PURE__ */ zod.object({
+export const AnnouncementsChannelsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -515,7 +515,7 @@ export const AnnouncementsChannelsListParams = /* @__PURE__ */ zod.object({
),
})
-export const CustomPropertyDefinitionsListParams = /* @__PURE__ */ zod.object({
+export const CustomPropertyDefinitionsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -523,12 +523,12 @@ export const CustomPropertyDefinitionsListParams = /* @__PURE__ */ zod.object({
),
})
-export const CustomPropertyDefinitionsListQueryParams = /* @__PURE__ */ zod.object({
+export const CustomPropertyDefinitionsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const CustomPropertyDefinitionsCreateParams = /* @__PURE__ */ zod.object({
+export const CustomPropertyDefinitionsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -545,7 +545,7 @@ export const customPropertyDefinitionsCreateBodyGroupTypeIndexMax = 4
export const customPropertyDefinitionsCreateBodyIsBigNumberDefault = false
export const customPropertyDefinitionsCreateBodyOptionsItemLabelMax = 400
-export const CustomPropertyDefinitionsCreateBody = /* @__PURE__ */ zod
+export const CustomPropertyDefinitionsCreateBody = () => zod
.object({
name: zod
.string()
@@ -624,7 +624,7 @@ export const CustomPropertyDefinitionsCreateBody = /* @__PURE__ */ zod
"A team-scoped definition of a custom account property — the attribute side of the model.\n\nHolds only the property's shape (name, display type, big-number flag). Per-account values are\nstored separately, so this serializer never reads or writes account values."
)
-export const CustomPropertyDefinitionsRetrieveParams = /* @__PURE__ */ zod.object({
+export const CustomPropertyDefinitionsRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -633,7 +633,7 @@ export const CustomPropertyDefinitionsRetrieveParams = /* @__PURE__ */ zod.objec
),
})
-export const CustomPropertyDefinitionsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const CustomPropertyDefinitionsPartialUpdateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -649,7 +649,7 @@ export const customPropertyDefinitionsPartialUpdateBodyGroupTypeIndexMax = 4
export const customPropertyDefinitionsPartialUpdateBodyOptionsItemLabelMax = 400
-export const CustomPropertyDefinitionsPartialUpdateBody = /* @__PURE__ */ zod
+export const CustomPropertyDefinitionsPartialUpdateBody = () => zod
.object({
name: zod
.string()
@@ -730,7 +730,7 @@ export const CustomPropertyDefinitionsPartialUpdateBody = /* @__PURE__ */ zod
"A team-scoped definition of a custom account property — the attribute side of the model.\n\nHolds only the property's shape (name, display type, big-number flag). Per-account values are\nstored separately, so this serializer never reads or writes account values."
)
-export const CustomPropertyDefinitionsDestroyParams = /* @__PURE__ */ zod.object({
+export const CustomPropertyDefinitionsDestroyParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -739,7 +739,7 @@ export const CustomPropertyDefinitionsDestroyParams = /* @__PURE__ */ zod.object
),
})
-export const CustomPropertySourcesListParams = /* @__PURE__ */ zod.object({
+export const CustomPropertySourcesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -747,12 +747,12 @@ export const CustomPropertySourcesListParams = /* @__PURE__ */ zod.object({
),
})
-export const CustomPropertySourcesListQueryParams = /* @__PURE__ */ zod.object({
+export const CustomPropertySourcesListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const CustomPropertySourcesCreateParams = /* @__PURE__ */ zod.object({
+export const CustomPropertySourcesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -766,7 +766,7 @@ export const customPropertySourcesCreateBodyKeyColumnMax = 400
export const customPropertySourcesCreateBodyIsEnabledDefault = true
-export const CustomPropertySourcesCreateBody = /* @__PURE__ */ zod
+export const CustomPropertySourcesCreateBody = () => zod
.object({
definition: zod
.string()
@@ -817,7 +817,7 @@ export const CustomPropertySourcesCreateBody = /* @__PURE__ */ zod
'Binds warehouse columns to a custom property definition. Account sources read a materialized\nview column and sync onto matching accounts; person and group sources read either an imported\nwarehouse table or a materialized view, and sync onto matching persons or groups on every\nwarehouse run of what they read.'
)
-export const CustomPropertySourcesRetrieveParams = /* @__PURE__ */ zod.object({
+export const CustomPropertySourcesRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -826,7 +826,7 @@ export const CustomPropertySourcesRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const CustomPropertySourcesPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const CustomPropertySourcesPartialUpdateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -839,7 +839,7 @@ export const customPropertySourcesPartialUpdateBodySourceColumnMax = 400
export const customPropertySourcesPartialUpdateBodyKeyColumnMax = 400
-export const CustomPropertySourcesPartialUpdateBody = /* @__PURE__ */ zod
+export const CustomPropertySourcesPartialUpdateBody = () => zod
.object({
source_column: zod
.string()
@@ -860,7 +860,7 @@ export const CustomPropertySourcesPartialUpdateBody = /* @__PURE__ */ zod
"Writable fields for updating a source. ``definition`` and ``saved_query`` are create-only, so\nthey are intentionally absent — only these reach the facade's update."
)
-export const CustomPropertySourcesDestroyParams = /* @__PURE__ */ zod.object({
+export const CustomPropertySourcesDestroyParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -874,7 +874,7 @@ export const CustomPropertySourcesDestroyParams = /* @__PURE__ */ zod.object({
* populates person or group properties for historical rows. Coalesces if one is already running
* for the table.
*/
-export const CustomPropertySourcesBackfillParams = /* @__PURE__ */ zod.object({
+export const CustomPropertySourcesBackfillParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -887,7 +887,7 @@ export const CustomPropertySourcesBackfillParams = /* @__PURE__ */ zod.object({
* The source's sync history, newest first. Person and group runs require viewer access to
* their warehouse source because the response includes row counts and sync errors.
*/
-export const CustomPropertySourcesRunsListParams = /* @__PURE__ */ zod.object({
+export const CustomPropertySourcesRunsListParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -896,7 +896,7 @@ export const CustomPropertySourcesRunsListParams = /* @__PURE__ */ zod.object({
),
})
-export const CustomPropertySourcesRunsListQueryParams = /* @__PURE__ */ zod.object({
+export const CustomPropertySourcesRunsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
search: zod
@@ -910,7 +910,7 @@ export const CustomPropertySourcesRunsListQueryParams = /* @__PURE__ */ zod.obje
* binding (a real, billable warehouse sync), a materialization for a view binding. The
* incremental person/group-property update runs off that run.
*/
-export const CustomPropertySourcesSyncParams = /* @__PURE__ */ zod.object({
+export const CustomPropertySourcesSyncParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -926,7 +926,7 @@ export const CustomPropertySourcesSyncParams = /* @__PURE__ */ zod.object({
* destination that is re-provisioned inside the same transaction as every write, so
* config and delivery can't drift apart.
*/
-export const EventStreamsListParams = /* @__PURE__ */ zod.object({
+export const EventStreamsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -941,7 +941,7 @@ export const EventStreamsListParams = /* @__PURE__ */ zod.object({
* destination that is re-provisioned inside the same transaction as every write, so
* config and delivery can't drift apart.
*/
-export const EventStreamsCreateParams = /* @__PURE__ */ zod.object({
+export const EventStreamsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -958,7 +958,7 @@ export const eventStreamsCreateBodySlackChannelIdMax = 200
export const eventStreamsCreateBodySlackChannelNameDefault = ``
export const eventStreamsCreateBodySlackChannelNameMax = 200
-export const EventStreamsCreateBody = /* @__PURE__ */ zod
+export const EventStreamsCreateBody = () => zod
.object({
enabled: zod
.boolean()
@@ -996,7 +996,7 @@ export const EventStreamsCreateBody = /* @__PURE__ */ zod
* destination that is re-provisioned inside the same transaction as every write, so
* config and delivery can't drift apart.
*/
-export const EventStreamsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const EventStreamsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this event stream.'),
project_id: zod
.string()
@@ -1011,7 +1011,7 @@ export const eventStreamsPartialUpdateBodySlackChannelIdMax = 200
export const eventStreamsPartialUpdateBodySlackChannelNameMax = 200
-export const EventStreamsPartialUpdateBody = /* @__PURE__ */ zod
+export const EventStreamsPartialUpdateBody = () => zod
.object({
enabled: zod
.boolean()
@@ -1049,7 +1049,7 @@ export const EventStreamsPartialUpdateBody = /* @__PURE__ */ zod
* destination that is re-provisioned inside the same transaction as every write, so
* config and delivery can't drift apart.
*/
-export const EventStreamsDestroyParams = /* @__PURE__ */ zod.object({
+export const EventStreamsDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this event stream.'),
project_id: zod
.string()
@@ -1065,7 +1065,7 @@ export const EventStreamsDestroyParams = /* @__PURE__ */ zod.object({
* destination that is re-provisioned inside the same transaction as every write, so
* config and delivery can't drift apart.
*/
-export const EventStreamsAddAccountCreateParams = /* @__PURE__ */ zod.object({
+export const EventStreamsAddAccountCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this event stream.'),
project_id: zod
.string()
@@ -1074,7 +1074,7 @@ export const EventStreamsAddAccountCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const EventStreamsAddAccountCreateBody = /* @__PURE__ */ zod
+export const EventStreamsAddAccountCreateBody = () => zod
.object({
account_id: zod.string().describe('UUID of the account to add to or remove from the stream.'),
})
@@ -1087,7 +1087,7 @@ export const EventStreamsAddAccountCreateBody = /* @__PURE__ */ zod
* destination that is re-provisioned inside the same transaction as every write, so
* config and delivery can't drift apart.
*/
-export const EventStreamsRemoveAccountCreateParams = /* @__PURE__ */ zod.object({
+export const EventStreamsRemoveAccountCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this event stream.'),
project_id: zod
.string()
@@ -1096,7 +1096,7 @@ export const EventStreamsRemoveAccountCreateParams = /* @__PURE__ */ zod.object(
),
})
-export const EventStreamsRemoveAccountCreateBody = /* @__PURE__ */ zod
+export const EventStreamsRemoveAccountCreateBody = () => zod
.object({
account_id: zod.string().describe('UUID of the account to add to or remove from the stream.'),
})
@@ -1109,7 +1109,7 @@ export const EventStreamsRemoveAccountCreateBody = /* @__PURE__ */ zod
* destination that is re-provisioned inside the same transaction as every write, so
* config and delivery can't drift apart.
*/
-export const EventStreamsSendTestMessageCreateParams = /* @__PURE__ */ zod.object({
+export const EventStreamsSendTestMessageCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this event stream.'),
project_id: zod
.string()
@@ -1118,7 +1118,7 @@ export const EventStreamsSendTestMessageCreateParams = /* @__PURE__ */ zod.objec
),
})
-export const FeatureRequestProductAreasListParams = /* @__PURE__ */ zod.object({
+export const FeatureRequestProductAreasListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1128,14 +1128,14 @@ export const FeatureRequestProductAreasListParams = /* @__PURE__ */ zod.object({
export const featureRequestProductAreasListQueryIncludeInactiveDefault = false
-export const FeatureRequestProductAreasListQueryParams = /* @__PURE__ */ zod.object({
+export const FeatureRequestProductAreasListQueryParams = () => zod.object({
include_inactive: zod
.boolean()
.default(featureRequestProductAreasListQueryIncludeInactiveDefault)
.describe('Include inactive product areas. Defaults to false.'),
})
-export const FeatureRequestProductAreasCreateParams = /* @__PURE__ */ zod.object({
+export const FeatureRequestProductAreasCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1150,7 +1150,7 @@ export const featureRequestProductAreasCreateBodyDisplayOrderMin = 0
export const featureRequestProductAreasCreateBodyIsActiveDefault = true
-export const FeatureRequestProductAreasCreateBody = /* @__PURE__ */ zod.object({
+export const FeatureRequestProductAreasCreateBody = () => zod.object({
name: zod.string().max(featureRequestProductAreasCreateBodyNameMax).describe('Team-maintained product area name.'),
display_order: zod
.number()
@@ -1163,7 +1163,7 @@ export const FeatureRequestProductAreasCreateBody = /* @__PURE__ */ zod.object({
.describe('Whether editors can select this product area for new requests.'),
})
-export const FeatureRequestProductAreasPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const FeatureRequestProductAreasPartialUpdateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -1176,7 +1176,7 @@ export const featureRequestProductAreasPartialUpdateBodyNameMax = 200
export const featureRequestProductAreasPartialUpdateBodyDisplayOrderMin = 0
-export const FeatureRequestProductAreasPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const FeatureRequestProductAreasPartialUpdateBody = () => zod.object({
name: zod
.string()
.max(featureRequestProductAreasPartialUpdateBodyNameMax)
@@ -1190,7 +1190,7 @@ export const FeatureRequestProductAreasPartialUpdateBody = /* @__PURE__ */ zod.o
is_active: zod.boolean().optional().describe('Whether editors can select this product area for new requests.'),
})
-export const FeatureRequestsListParams = /* @__PURE__ */ zod.object({
+export const FeatureRequestsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1201,7 +1201,7 @@ export const FeatureRequestsListParams = /* @__PURE__ */ zod.object({
export const featureRequestsListQueryArchiveStateDefault = `active`
export const featureRequestsListQueryRequestOrderingDefault = `-updated_at`
-export const FeatureRequestsListQueryParams = /* @__PURE__ */ zod.object({
+export const FeatureRequestsListQueryParams = () => zod.object({
account_ids: zod
.array(zod.string())
.optional()
@@ -1250,7 +1250,7 @@ export const FeatureRequestsListQueryParams = /* @__PURE__ */ zod.object({
.describe('Lifecycle statuses to include. Multiple values use OR semantics.'),
})
-export const FeatureRequestsCreateParams = /* @__PURE__ */ zod.object({
+export const FeatureRequestsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1270,7 +1270,7 @@ export const featureRequestsCreateBodyEvidenceOneSourceUrlOneMax = 2000
export const featureRequestsCreateBodyEvidenceOneSourceUrlTwoMax = 0
-export const FeatureRequestsCreateBody = /* @__PURE__ */ zod.object({
+export const FeatureRequestsCreateBody = () => zod.object({
title: zod.string().max(featureRequestsCreateBodyTitleMax).describe('Required customer-facing request title.'),
description: zod
.string()
@@ -1325,7 +1325,7 @@ export const FeatureRequestsCreateBody = /* @__PURE__ */ zod.object({
.describe('Optional first evidence item to create for the selected account.'),
})
-export const FeatureRequestsRetrieveParams = /* @__PURE__ */ zod.object({
+export const FeatureRequestsRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -1334,7 +1334,7 @@ export const FeatureRequestsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const FeatureRequestsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const FeatureRequestsPartialUpdateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -1345,7 +1345,7 @@ export const FeatureRequestsPartialUpdateParams = /* @__PURE__ */ zod.object({
export const featureRequestsPartialUpdateBodyTitleMax = 400
-export const FeatureRequestsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const FeatureRequestsPartialUpdateBody = () => zod.object({
expected_version: zod
.number()
.min(1)
@@ -1386,7 +1386,7 @@ export const FeatureRequestsPartialUpdateBody = /* @__PURE__ */ zod.object({
),
})
-export const FeatureRequestsAddAccountCreateParams = /* @__PURE__ */ zod.object({
+export const FeatureRequestsAddAccountCreateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -1404,7 +1404,7 @@ export const featureRequestsAddAccountCreateBodyEvidenceOneSourceUrlOneMax = 200
export const featureRequestsAddAccountCreateBodyEvidenceOneSourceUrlTwoMax = 0
-export const FeatureRequestsAddAccountCreateBody = /* @__PURE__ */ zod.object({
+export const FeatureRequestsAddAccountCreateBody = () => zod.object({
expected_version: zod
.number()
.min(1)
@@ -1450,7 +1450,7 @@ export const FeatureRequestsAddAccountCreateBody = /* @__PURE__ */ zod.object({
.describe('Optional first evidence item to create for the account in the same change.'),
})
-export const FeatureRequestsAddEvidenceCreateParams = /* @__PURE__ */ zod.object({
+export const FeatureRequestsAddEvidenceCreateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -1468,7 +1468,7 @@ export const featureRequestsAddEvidenceCreateBodySourceUrlOneMax = 2000
export const featureRequestsAddEvidenceCreateBodySourceUrlTwoMax = 0
-export const FeatureRequestsAddEvidenceCreateBody = /* @__PURE__ */ zod.object({
+export const FeatureRequestsAddEvidenceCreateBody = () => zod.object({
summary: zod
.string()
.default(featureRequestsAddEvidenceCreateBodySummaryDefault)
@@ -1503,7 +1503,7 @@ export const FeatureRequestsAddEvidenceCreateBody = /* @__PURE__ */ zod.object({
account_link_id: zod.string().describe('Active account link that owns this evidence.'),
})
-export const FeatureRequestsArchiveCreateParams = /* @__PURE__ */ zod.object({
+export const FeatureRequestsArchiveCreateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -1512,14 +1512,14 @@ export const FeatureRequestsArchiveCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const FeatureRequestsArchiveCreateBody = /* @__PURE__ */ zod.object({
+export const FeatureRequestsArchiveCreateBody = () => zod.object({
expected_version: zod
.number()
.min(1)
.describe('Request version loaded by the editor. Stale versions return 409 Conflict.'),
})
-export const FeatureRequestsHistoryListParams = /* @__PURE__ */ zod.object({
+export const FeatureRequestsHistoryListParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -1528,7 +1528,7 @@ export const FeatureRequestsHistoryListParams = /* @__PURE__ */ zod.object({
),
})
-export const FeatureRequestsRemoveEvidenceCreateParams = /* @__PURE__ */ zod.object({
+export const FeatureRequestsRemoveEvidenceCreateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -1537,7 +1537,7 @@ export const FeatureRequestsRemoveEvidenceCreateParams = /* @__PURE__ */ zod.obj
),
})
-export const FeatureRequestsRemoveEvidenceCreateBody = /* @__PURE__ */ zod.object({
+export const FeatureRequestsRemoveEvidenceCreateBody = () => zod.object({
expected_version: zod
.number()
.min(1)
@@ -1545,7 +1545,7 @@ export const FeatureRequestsRemoveEvidenceCreateBody = /* @__PURE__ */ zod.objec
evidence_id: zod.string().describe('Evidence item to delete.'),
})
-export const FeatureRequestsRestoreCreateParams = /* @__PURE__ */ zod.object({
+export const FeatureRequestsRestoreCreateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -1554,14 +1554,14 @@ export const FeatureRequestsRestoreCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const FeatureRequestsRestoreCreateBody = /* @__PURE__ */ zod.object({
+export const FeatureRequestsRestoreCreateBody = () => zod.object({
expected_version: zod
.number()
.min(1)
.describe('Request version loaded by the editor. Stale versions return 409 Conflict.'),
})
-export const FeatureRequestsStatusHistoryListParams = /* @__PURE__ */ zod.object({
+export const FeatureRequestsStatusHistoryListParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -1570,7 +1570,7 @@ export const FeatureRequestsStatusHistoryListParams = /* @__PURE__ */ zod.object
),
})
-export const FeatureRequestsUpdateEvidenceCreateParams = /* @__PURE__ */ zod.object({
+export const FeatureRequestsUpdateEvidenceCreateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -1588,7 +1588,7 @@ export const featureRequestsUpdateEvidenceCreateBodySourceUrlOneMax = 2000
export const featureRequestsUpdateEvidenceCreateBodySourceUrlTwoMax = 0
-export const FeatureRequestsUpdateEvidenceCreateBody = /* @__PURE__ */ zod.object({
+export const FeatureRequestsUpdateEvidenceCreateBody = () => zod.object({
summary: zod
.string()
.default(featureRequestsUpdateEvidenceCreateBodySummaryDefault)
@@ -1626,7 +1626,7 @@ export const FeatureRequestsUpdateEvidenceCreateBody = /* @__PURE__ */ zod.objec
export const groupsTypesMetricsListPathGroupTypeIndexMin = -2147483648
export const groupsTypesMetricsListPathGroupTypeIndexMax = 2147483647
-export const GroupsTypesMetricsListParams = /* @__PURE__ */ zod.object({
+export const GroupsTypesMetricsListParams = () => zod.object({
group_type_index: zod
.number()
.min(groupsTypesMetricsListPathGroupTypeIndexMin)
@@ -1638,7 +1638,7 @@ export const GroupsTypesMetricsListParams = /* @__PURE__ */ zod.object({
),
})
-export const GroupsTypesMetricsListQueryParams = /* @__PURE__ */ zod.object({
+export const GroupsTypesMetricsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
@@ -1646,7 +1646,7 @@ export const GroupsTypesMetricsListQueryParams = /* @__PURE__ */ zod.object({
export const groupsTypesMetricsCreatePathGroupTypeIndexMin = -2147483648
export const groupsTypesMetricsCreatePathGroupTypeIndexMax = 2147483647
-export const GroupsTypesMetricsCreateParams = /* @__PURE__ */ zod.object({
+export const GroupsTypesMetricsCreateParams = () => zod.object({
group_type_index: zod
.number()
.min(groupsTypesMetricsCreatePathGroupTypeIndexMin)
@@ -1666,7 +1666,7 @@ export const groupsTypesMetricsCreateBodyDisplayDefault = `number`
export const groupsTypesMetricsCreateBodyMathDefault = `count`
export const groupsTypesMetricsCreateBodyMathPropertyMax = 255
-export const GroupsTypesMetricsCreateBody = /* @__PURE__ */ zod.object({
+export const GroupsTypesMetricsCreateBody = () => zod.object({
name: zod
.string()
.max(groupsTypesMetricsCreateBodyNameMax)
@@ -1713,7 +1713,7 @@ export const GroupsTypesMetricsCreateBody = /* @__PURE__ */ zod.object({
export const groupsTypesMetricsRetrievePathGroupTypeIndexMin = -2147483648
export const groupsTypesMetricsRetrievePathGroupTypeIndexMax = 2147483647
-export const GroupsTypesMetricsRetrieveParams = /* @__PURE__ */ zod.object({
+export const GroupsTypesMetricsRetrieveParams = () => zod.object({
group_type_index: zod
.number()
.min(groupsTypesMetricsRetrievePathGroupTypeIndexMin)
@@ -1729,7 +1729,7 @@ export const GroupsTypesMetricsRetrieveParams = /* @__PURE__ */ zod.object({
export const groupsTypesMetricsPartialUpdatePathGroupTypeIndexMin = -2147483648
export const groupsTypesMetricsPartialUpdatePathGroupTypeIndexMax = 2147483647
-export const GroupsTypesMetricsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const GroupsTypesMetricsPartialUpdateParams = () => zod.object({
group_type_index: zod
.number()
.min(groupsTypesMetricsPartialUpdatePathGroupTypeIndexMin)
@@ -1746,7 +1746,7 @@ export const groupsTypesMetricsPartialUpdateBodyNameMax = 255
export const groupsTypesMetricsPartialUpdateBodyMathPropertyMax = 255
-export const GroupsTypesMetricsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const GroupsTypesMetricsPartialUpdateBody = () => zod.object({
name: zod
.string()
.max(groupsTypesMetricsPartialUpdateBodyNameMax)
@@ -1795,7 +1795,7 @@ export const GroupsTypesMetricsPartialUpdateBody = /* @__PURE__ */ zod.object({
export const groupsTypesMetricsDestroyPathGroupTypeIndexMin = -2147483648
export const groupsTypesMetricsDestroyPathGroupTypeIndexMax = 2147483647
-export const GroupsTypesMetricsDestroyParams = /* @__PURE__ */ zod.object({
+export const GroupsTypesMetricsDestroyParams = () => zod.object({
group_type_index: zod
.number()
.min(groupsTypesMetricsDestroyPathGroupTypeIndexMin)
diff --git a/services/mcp/src/generated/dashboards/api.ts b/services/mcp/src/generated/dashboards/api.ts
index 99ad6a40c02a..7c641cb4a3c1 100644
--- a/services/mcp/src/generated/dashboards/api.ts
+++ b/services/mcp/src/generated/dashboards/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const DashboardTemplatesListParams = /* @__PURE__ */ zod.object({
+export const DashboardTemplatesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,7 +16,7 @@ export const DashboardTemplatesListParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardTemplatesListQueryParams = /* @__PURE__ */ zod.object({
+export const DashboardTemplatesListQueryParams = () => zod.object({
is_featured: zod
.boolean()
.optional()
@@ -45,7 +45,7 @@ export const DashboardTemplatesListQueryParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardTemplatesRetrieveParams = /* @__PURE__ */ zod.object({
+export const DashboardTemplatesRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this dashboard template.'),
project_id: zod
.string()
@@ -54,7 +54,7 @@ export const DashboardTemplatesRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardsListParams = /* @__PURE__ */ zod.object({
+export const DashboardsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -62,7 +62,7 @@ export const DashboardsListParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardsListQueryParams = /* @__PURE__ */ zod.object({
+export const DashboardsListQueryParams = () => zod.object({
folder: zod
.string()
.optional()
@@ -80,7 +80,7 @@ export const DashboardsListQueryParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardsCreateParams = /* @__PURE__ */ zod.object({
+export const DashboardsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -88,7 +88,7 @@ export const DashboardsCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardsCreateQueryParams = /* @__PURE__ */ zod.object({
+export const DashboardsCreateQueryParams = () => zod.object({
format: zod.enum(['json', 'txt']).optional(),
include_dashboards: zod
.boolean()
@@ -102,7 +102,7 @@ export const dashboardsCreateBodyNameMax = 400
export const dashboardsCreateBodyDeleteInsightsDefault = false
-export const DashboardsCreateBody = /* @__PURE__ */ zod
+export const DashboardsCreateBody = () => zod
.object({
name: zod.string().max(dashboardsCreateBodyNameMax).nullish(),
description: zod.string().optional(),
@@ -148,7 +148,7 @@ export const DashboardsCreateBody = /* @__PURE__ */ zod
})
.describe('Serializer mixin that handles tags for objects.')
-export const DashboardsRetrieveParams = /* @__PURE__ */ zod.object({
+export const DashboardsRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this dashboard.'),
project_id: zod
.string()
@@ -157,7 +157,7 @@ export const DashboardsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const DashboardsRetrieveQueryParams = () => zod.object({
filters_override: zod
.string()
.optional()
@@ -179,7 +179,7 @@ export const DashboardsRetrieveQueryParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const DashboardsPartialUpdateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this dashboard.'),
project_id: zod
.string()
@@ -188,7 +188,7 @@ export const DashboardsPartialUpdateParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardsPartialUpdateQueryParams = /* @__PURE__ */ zod.object({
+export const DashboardsPartialUpdateQueryParams = () => zod.object({
format: zod.enum(['json', 'txt']).optional(),
include_dashboards: zod
.boolean()
@@ -256,7 +256,7 @@ export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightSavedVie
export const dashboardsPartialUpdateBodyTilesItemWidgetOneNameMax = 400
-export const DashboardsPartialUpdateBody = /* @__PURE__ */ zod
+export const DashboardsPartialUpdateBody = () => zod
.object({
name: zod.string().max(dashboardsPartialUpdateBodyNameMax).nullish(),
description: zod.string().optional(),
@@ -1049,7 +1049,7 @@ export const DashboardsPartialUpdateBody = /* @__PURE__ */ zod
/**
* Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
*/
-export const DashboardsDestroyParams = /* @__PURE__ */ zod.object({
+export const DashboardsDestroyParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this dashboard.'),
project_id: zod
.string()
@@ -1058,14 +1058,14 @@ export const DashboardsDestroyParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardsDestroyQueryParams = /* @__PURE__ */ zod.object({
+export const DashboardsDestroyQueryParams = () => zod.object({
format: zod.enum(['json', 'txt']).optional(),
})
/**
* Copy an existing dashboard tile to another dashboard (insight, text card, or widget tile).
*/
-export const DashboardsCopyTileCreateParams = /* @__PURE__ */ zod.object({
+export const DashboardsCopyTileCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this dashboard.'),
project_id: zod
.string()
@@ -1074,11 +1074,11 @@ export const DashboardsCopyTileCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardsCopyTileCreateQueryParams = /* @__PURE__ */ zod.object({
+export const DashboardsCopyTileCreateQueryParams = () => zod.object({
format: zod.enum(['json', 'txt']).optional(),
})
-export const DashboardsCopyTileCreateBody = /* @__PURE__ */ zod.object({
+export const DashboardsCopyTileCreateBody = () => zod.object({
fromDashboardId: zod.number().describe('Dashboard id the tile currently belongs to.'),
tileId: zod.number().describe('Dashboard tile id to copy.'),
})
@@ -1089,7 +1089,7 @@ export const DashboardsCopyTileCreateBody = /* @__PURE__ */ zod.object({
* Text tiles render as markdown blocks on the dashboard — useful as section headings, dividers,
* or annotations between insight tiles to give the dashboard structure.
*/
-export const DashboardsCreateTextTileCreateParams = /* @__PURE__ */ zod.object({
+export const DashboardsCreateTextTileCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this dashboard.'),
project_id: zod
.string()
@@ -1098,7 +1098,7 @@ export const DashboardsCreateTextTileCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardsCreateTextTileCreateQueryParams = /* @__PURE__ */ zod.object({
+export const DashboardsCreateTextTileCreateQueryParams = () => zod.object({
format: zod.enum(['json', 'txt']).optional(),
})
@@ -1106,7 +1106,7 @@ export const dashboardsCreateTextTileCreateBodyBodyMax = 4000
export const dashboardsCreateTextTileCreateBodyColorMax = 400
-export const DashboardsCreateTextTileCreateBody = /* @__PURE__ */ zod.object({
+export const DashboardsCreateTextTileCreateBody = () => zod.object({
body: zod
.string()
.min(1)
@@ -1153,7 +1153,7 @@ export const DashboardsCreateTextTileCreateBody = /* @__PURE__ */ zod.object({
* object is preserved — only the dashboard tile is hidden. To delete the entire dashboard,
* use the dashboard delete endpoint instead.
*/
-export const DashboardsDeleteTileParams = /* @__PURE__ */ zod.object({
+export const DashboardsDeleteTileParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this dashboard.'),
project_id: zod
.string()
@@ -1162,15 +1162,15 @@ export const DashboardsDeleteTileParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardsDeleteTileQueryParams = /* @__PURE__ */ zod.object({
+export const DashboardsDeleteTileQueryParams = () => zod.object({
format: zod.enum(['json', 'txt']).optional(),
})
-export const DashboardsDeleteTileBody = /* @__PURE__ */ zod.object({
+export const DashboardsDeleteTileBody = () => zod.object({
tile_id: zod.number().describe('ID of the dashboard tile to delete. Use dashboard-get to look up tile IDs.'),
})
-export const DashboardsMoveTilePartialUpdateParams = /* @__PURE__ */ zod.object({
+export const DashboardsMoveTilePartialUpdateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this dashboard.'),
project_id: zod
.string()
@@ -1179,11 +1179,11 @@ export const DashboardsMoveTilePartialUpdateParams = /* @__PURE__ */ zod.object(
),
})
-export const DashboardsMoveTilePartialUpdateQueryParams = /* @__PURE__ */ zod.object({
+export const DashboardsMoveTilePartialUpdateQueryParams = () => zod.object({
format: zod.enum(['json', 'txt']).optional(),
})
-export const DashboardsMoveTilePartialUpdateBody = /* @__PURE__ */ zod.object({
+export const DashboardsMoveTilePartialUpdateBody = () => zod.object({
to_dashboard: zod.number().optional().describe('Destination dashboard ID.'),
tile: zod
.object({
@@ -1193,7 +1193,7 @@ export const DashboardsMoveTilePartialUpdateBody = /* @__PURE__ */ zod.object({
.describe('Tile to move, identified by its dashboard tile ID.'),
})
-export const DashboardsReorderTilesCreateParams = /* @__PURE__ */ zod.object({
+export const DashboardsReorderTilesCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this dashboard.'),
project_id: zod
.string()
@@ -1202,13 +1202,13 @@ export const DashboardsReorderTilesCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardsReorderTilesCreateQueryParams = /* @__PURE__ */ zod.object({
+export const DashboardsReorderTilesCreateQueryParams = () => zod.object({
format: zod.enum(['json', 'txt']).optional(),
})
export const dashboardsReorderTilesCreateBodyLayoutDefault = `preserve`
-export const DashboardsReorderTilesCreateBody = /* @__PURE__ */ zod.object({
+export const DashboardsReorderTilesCreateBody = () => zod.object({
tile_order: zod
.array(zod.number())
.min(1)
@@ -1225,7 +1225,7 @@ export const DashboardsReorderTilesCreateBody = /* @__PURE__ */ zod.object({
/**
* Run all insights on a dashboard and return their results.
*/
-export const DashboardsRunInsightsRetrieveParams = /* @__PURE__ */ zod.object({
+export const DashboardsRunInsightsRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this dashboard.'),
project_id: zod
.string()
@@ -1234,7 +1234,7 @@ export const DashboardsRunInsightsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardsRunInsightsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const DashboardsRunInsightsRetrieveQueryParams = () => zod.object({
filters_override: zod
.string()
.optional()
@@ -1262,7 +1262,7 @@ export const DashboardsRunInsightsRetrieveQueryParams = /* @__PURE__ */ zod.obje
),
})
-export const DashboardsRunWidgetsRetrieveParams = /* @__PURE__ */ zod.object({
+export const DashboardsRunWidgetsRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this dashboard.'),
project_id: zod
.string()
@@ -1271,7 +1271,7 @@ export const DashboardsRunWidgetsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardsRunWidgetsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const DashboardsRunWidgetsRetrieveQueryParams = () => zod.object({
format: zod.enum(['json', 'txt']).optional(),
tile_ids: zod.string().describe('Comma-separated dashboard tile IDs to run widgets for.'),
})
@@ -1279,7 +1279,7 @@ export const DashboardsRunWidgetsRetrieveQueryParams = /* @__PURE__ */ zod.objec
/**
* Update the markdown body, layout, or color of an existing text tile on a dashboard.
*/
-export const DashboardsUpdateTextTileCreateParams = /* @__PURE__ */ zod.object({
+export const DashboardsUpdateTextTileCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this dashboard.'),
project_id: zod
.string()
@@ -1288,7 +1288,7 @@ export const DashboardsUpdateTextTileCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardsUpdateTextTileCreateQueryParams = /* @__PURE__ */ zod.object({
+export const DashboardsUpdateTextTileCreateQueryParams = () => zod.object({
format: zod.enum(['json', 'txt']).optional(),
})
@@ -1296,7 +1296,7 @@ export const dashboardsUpdateTextTileCreateBodyBodyMax = 4000
export const dashboardsUpdateTextTileCreateBodyColorMax = 400
-export const DashboardsUpdateTextTileCreateBody = /* @__PURE__ */ zod.object({
+export const DashboardsUpdateTextTileCreateBody = () => zod.object({
tile_id: zod.number().describe('ID of the dashboard tile to update. Use dashboard-get to look up tile IDs.'),
body: zod
.string()
@@ -1337,7 +1337,7 @@ export const DashboardsUpdateTextTileCreateBody = /* @__PURE__ */ zod.object({
/**
* Add multiple widget tiles to a dashboard in one atomic request.
*/
-export const DashboardsWidgetsBatchCreateParams = /* @__PURE__ */ zod.object({
+export const DashboardsWidgetsBatchCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this dashboard.'),
project_id: zod
.string()
@@ -1346,7 +1346,7 @@ export const DashboardsWidgetsBatchCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardsWidgetsBatchCreateQueryParams = /* @__PURE__ */ zod.object({
+export const DashboardsWidgetsBatchCreateQueryParams = () => zod.object({
format: zod.enum(['json', 'txt']).optional(),
})
@@ -1421,7 +1421,7 @@ export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneSavedViewI
export const dashboardsWidgetsBatchCreateBodyWidgetsMax = 10
-export const DashboardsWidgetsBatchCreateBody = /* @__PURE__ */ zod
+export const DashboardsWidgetsBatchCreateBody = () => zod
.object({
widgets: zod
.array(
@@ -2536,7 +2536,7 @@ export const DashboardsWidgetsBatchCreateBody = /* @__PURE__ */ zod
* that. All updates succeed or fail together. To add new widgets, use the widgets/batch POST endpoint; to
* remove one, use delete_tile.
*/
-export const DashboardsUpdateWidgetsBatchParams = /* @__PURE__ */ zod.object({
+export const DashboardsUpdateWidgetsBatchParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this dashboard.'),
project_id: zod
.string()
@@ -2545,7 +2545,7 @@ export const DashboardsUpdateWidgetsBatchParams = /* @__PURE__ */ zod.object({
),
})
-export const DashboardsUpdateWidgetsBatchQueryParams = /* @__PURE__ */ zod.object({
+export const DashboardsUpdateWidgetsBatchQueryParams = () => zod.object({
format: zod.enum(['json', 'txt']).optional(),
})
@@ -2620,7 +2620,7 @@ export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneSavedViewI
export const dashboardsUpdateWidgetsBatchBodyWidgetsMax = 10
-export const DashboardsUpdateWidgetsBatchBody = /* @__PURE__ */ zod
+export const DashboardsUpdateWidgetsBatchBody = () => zod
.object({
widgets: zod
.array(
@@ -3402,7 +3402,7 @@ export const DashboardsUpdateWidgetsBatchBody = /* @__PURE__ */ zod
/**
* List registered dashboard widget types and per-type config_schema documentation for agents.
*/
-export const DashboardsWidgetCatalogRetrieveParams = /* @__PURE__ */ zod.object({
+export const DashboardsWidgetCatalogRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -3410,6 +3410,6 @@ export const DashboardsWidgetCatalogRetrieveParams = /* @__PURE__ */ zod.object(
),
})
-export const DashboardsWidgetCatalogRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const DashboardsWidgetCatalogRetrieveQueryParams = () => zod.object({
format: zod.enum(['json', 'txt']).optional(),
})
diff --git a/services/mcp/src/generated/data_catalog/api.ts b/services/mcp/src/generated/data_catalog/api.ts
index c6f5adff1de3..8e45d60726bb 100644
--- a/services/mcp/src/generated/data_catalog/api.ts
+++ b/services/mcp/src/generated/data_catalog/api.ts
@@ -11,7 +11,7 @@ import * as zod from 'zod'
/**
* Trust marks on warehouse tables and views. Reads exclude soft-deleted targets.
*/
-export const DataCatalogCertificationsCreateParams = /* @__PURE__ */ zod.object({
+export const DataCatalogCertificationsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -21,7 +21,7 @@ export const DataCatalogCertificationsCreateParams = /* @__PURE__ */ zod.object(
export const dataCatalogCertificationsCreateBodyProposedStatusDefault = `certified`
-export const DataCatalogCertificationsCreateBody = /* @__PURE__ */ zod
+export const DataCatalogCertificationsCreateBody = () => zod
.object({
table_id: zod.string().optional().describe('Warehouse table id to certify (XOR the other targets).'),
saved_query_id: zod.string().optional().describe('Warehouse view (saved query) id to certify.'),
@@ -41,7 +41,7 @@ export const DataCatalogCertificationsCreateBody = /* @__PURE__ */ zod
/**
* Mark the target as certified (prefer this source).
*/
-export const DataCatalogCertificationsCertifyCreateParams = /* @__PURE__ */ zod.object({
+export const DataCatalogCertificationsCertifyCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this table certification.'),
project_id: zod
.string()
@@ -53,7 +53,7 @@ export const DataCatalogCertificationsCertifyCreateParams = /* @__PURE__ */ zod.
/**
* Mark the target as deprecated (avoid this source).
*/
-export const DataCatalogCertificationsDeprecateCreateParams = /* @__PURE__ */ zod.object({
+export const DataCatalogCertificationsDeprecateCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this table certification.'),
project_id: zod
.string()
@@ -65,7 +65,7 @@ export const DataCatalogCertificationsDeprecateCreateParams = /* @__PURE__ */ zo
/**
* Create a metric, or refine the one already holding this name for the team.
*/
-export const DataCatalogMetricsCreateParams = /* @__PURE__ */ zod.object({
+export const DataCatalogMetricsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -89,7 +89,7 @@ export const dataCatalogMetricsCreateBodyAiModelMax = 128
export const dataCatalogMetricsCreateBodyConfidenceMin = 0
export const dataCatalogMetricsCreateBodyConfidenceMax = 1
-export const DataCatalogMetricsCreateBody = /* @__PURE__ */ zod.object({
+export const DataCatalogMetricsCreateBody = () => zod.object({
name: zod
.string()
.max(dataCatalogMetricsCreateBodyNameMax)
@@ -141,7 +141,7 @@ export const DataCatalogMetricsCreateBody = /* @__PURE__ */ zod.object({
/**
* CRUD for catalog metrics, addressed by their ``name`` (e.g. /metrics/mrr/).
*/
-export const DataCatalogMetricsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const DataCatalogMetricsPartialUpdateParams = () => zod.object({
name: zod.string(),
project_id: zod
.string()
@@ -166,7 +166,7 @@ export const dataCatalogMetricsPartialUpdateBodyAiModelMax = 128
export const dataCatalogMetricsPartialUpdateBodyConfidenceMin = 0
export const dataCatalogMetricsPartialUpdateBodyConfidenceMax = 1
-export const DataCatalogMetricsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const DataCatalogMetricsPartialUpdateBody = () => zod.object({
name: zod
.string()
.max(dataCatalogMetricsPartialUpdateBodyNameMax)
@@ -220,7 +220,7 @@ export const DataCatalogMetricsPartialUpdateBody = /* @__PURE__ */ zod.object({
/**
* Bless a metric as canonical. Returns 409 while the metric is drifted from its insight.
*/
-export const DataCatalogMetricsApproveCreateParams = /* @__PURE__ */ zod.object({
+export const DataCatalogMetricsApproveCreateParams = () => zod.object({
name: zod.string(),
project_id: zod
.string()
@@ -232,7 +232,7 @@ export const DataCatalogMetricsApproveCreateParams = /* @__PURE__ */ zod.object(
/**
* Re-snapshot the linked insight's current query into the definition.
*/
-export const DataCatalogMetricsRefreshFromInsightCreateParams = /* @__PURE__ */ zod.object({
+export const DataCatalogMetricsRefreshFromInsightCreateParams = () => zod.object({
name: zod.string(),
project_id: zod
.string()
@@ -244,7 +244,7 @@ export const DataCatalogMetricsRefreshFromInsightCreateParams = /* @__PURE__ */
/**
* Execute the metric's definition and return the normalized result envelope.
*/
-export const DataCatalogMetricsRunCreateParams = /* @__PURE__ */ zod.object({
+export const DataCatalogMetricsRunCreateParams = () => zod.object({
name: zod.string(),
project_id: zod
.string()
@@ -253,7 +253,7 @@ export const DataCatalogMetricsRunCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const DataCatalogMetricsRunCreateQueryParams = /* @__PURE__ */ zod.object({
+export const DataCatalogMetricsRunCreateQueryParams = () => zod.object({
refresh: zod
.enum(['blocking', 'async', 'lazy_async', 'force_blocking', 'force_async', 'force_cache'])
.optional()
@@ -262,7 +262,7 @@ export const DataCatalogMetricsRunCreateQueryParams = /* @__PURE__ */ zod.object
),
})
-export const DataCatalogMetricsRunCreateBody = /* @__PURE__ */ zod
+export const DataCatalogMetricsRunCreateBody = () => zod
.object({
date_from: zod
.string()
@@ -287,7 +287,7 @@ export const DataCatalogMetricsRunCreateBody = /* @__PURE__ */ zod
/**
* Reviewed join facts. Accepting one promotes it to a real DataWarehouseJoin; rejections persist.
*/
-export const DataCatalogRelationshipProposalsCreateParams = /* @__PURE__ */ zod.object({
+export const DataCatalogRelationshipProposalsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -308,7 +308,7 @@ export const dataCatalogRelationshipProposalsCreateBodyFieldNameMax = 400
export const dataCatalogRelationshipProposalsCreateBodyConfidenceMin = 0
export const dataCatalogRelationshipProposalsCreateBodyConfidenceMax = 1
-export const DataCatalogRelationshipProposalsCreateBody = /* @__PURE__ */ zod.object({
+export const DataCatalogRelationshipProposalsCreateBody = () => zod.object({
source_table_name: zod
.string()
.max(dataCatalogRelationshipProposalsCreateBodySourceTableNameMax)
@@ -343,7 +343,7 @@ export const DataCatalogRelationshipProposalsCreateBody = /* @__PURE__ */ zod.ob
/**
* Promote the proposal to a real warehouse join after re-validating and probing it.
*/
-export const DataCatalogRelationshipProposalsAcceptCreateParams = /* @__PURE__ */ zod.object({
+export const DataCatalogRelationshipProposalsAcceptCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this relationship proposal.'),
project_id: zod
.string()
@@ -355,7 +355,7 @@ export const DataCatalogRelationshipProposalsAcceptCreateParams = /* @__PURE__ *
/**
* Reject the proposal. Persists forever so the pair is never re-proposed.
*/
-export const DataCatalogRelationshipProposalsRejectCreateParams = /* @__PURE__ */ zod.object({
+export const DataCatalogRelationshipProposalsRejectCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this relationship proposal.'),
project_id: zod
.string()
@@ -364,7 +364,7 @@ export const DataCatalogRelationshipProposalsRejectCreateParams = /* @__PURE__ *
),
})
-export const DataCatalogRelationshipProposalsRejectCreateBody = /* @__PURE__ */ zod.object({
+export const DataCatalogRelationshipProposalsRejectCreateBody = () => zod.object({
rejection_reason: zod
.string()
.optional()
diff --git a/services/mcp/src/generated/data_management/api.ts b/services/mcp/src/generated/data_management/api.ts
index 323026536de2..3d35f54cb76e 100644
--- a/services/mcp/src/generated/data_management/api.ts
+++ b/services/mcp/src/generated/data_management/api.ts
@@ -12,76 +12,78 @@ import * as zod from 'zod'
* Lists this project's ingestion warnings — events or person/group updates that were ingested with problems (oversized messages, rejected person merges, invalid data) — grouped by warning type. Each entry carries the warning's category and severity, the total count and a sparkline over the requested time range, and the most recent sample warnings with the affected event/person/group. Filter by category, type, severity or time range to drill into a specific problem.
* @summary List ingestion warnings
*/
-export const IngestionWarningsV2ListParams = /* @__PURE__ */ zod.object({
- project_id: zod
- .string()
- .describe(
- "Project ID of the project you're trying to access. To find the ID of the project, make a call to \/api\/projects\/."
- ),
-})
+export const IngestionWarningsV2ListParams = () =>
+ zod.object({
+ project_id: zod
+ .string()
+ .describe(
+ "Project ID of the project you're trying to access. To find the ID of the project, make a call to \/api\/projects\/."
+ ),
+ })
export const ingestionWarningsV2ListQueryLimitMax = 500
export const ingestionWarningsV2ListQuerySamplesMax = 50
-export const IngestionWarningsV2ListQueryParams = /* @__PURE__ */ zod.object({
- category: zod
- .string()
- .min(1)
- .optional()
- .describe(
- "Only return warnings in this category (e.g. 'size', 'merge', 'event'). Warnings from producers that don't yet emit a category have category 'unknown'."
- ),
- limit: zod
- .number()
- .min(1)
- .max(ingestionWarningsV2ListQueryLimitMax)
- .optional()
- .describe('Maximum number of warning types to return (default 100).'),
- order_by: zod
- .enum(['count', 'last_seen'])
- .optional()
- .describe(
- "Sort order for warning types: 'count' (most frequent first, the default) or 'last_seen' (most recent first).\n\n\* `count` - count\n\* `last_seen` - last_seen"
- ),
- q: zod
- .string()
- .min(1)
- .optional()
- .describe(
- 'Only return warnings whose type or details contain this substring (case-sensitive). Useful for finding warnings about a specific distinct ID, event or property.'
- ),
- samples: zod
- .number()
- .min(1)
- .max(ingestionWarningsV2ListQuerySamplesMax)
- .optional()
- .describe('Maximum number of recent sample warnings to return per warning type (default 5).'),
- severity: zod
- .enum(['info', 'warning', 'error'])
- .optional()
- .describe(
- "Only return warnings with this severity. Warnings from producers that don't yet emit a severity have severity 'warning'.\n\n\* `info` - info\n\* `warning` - warning\n\* `error` - error"
- ),
- since: zod
- .string()
- .min(1)
- .optional()
- .describe(
- "Start of the time range, as an ISO 8601 datetime (e.g. '2026-07-01T00:00:00Z') or a relative duration (e.g. '-24h', '-7d'). Defaults to 24 hours ago. Warnings are retained for 90 days."
- ),
- type: zod
- .string()
- .min(1)
- .optional()
- .describe(
- "Only return warnings of this type (e.g. 'message_size_too_large', 'cannot_merge_already_identified')."
- ),
- until: zod
- .string()
- .min(1)
- .optional()
- .describe(
- "End of the time range, as an ISO 8601 datetime or a relative duration (e.g. '-1h'). Defaults to now."
- ),
-})
+export const IngestionWarningsV2ListQueryParams = () =>
+ zod.object({
+ category: zod
+ .string()
+ .min(1)
+ .optional()
+ .describe(
+ "Only return warnings in this category (e.g. 'size', 'merge', 'event'). Warnings from producers that don't yet emit a category have category 'unknown'."
+ ),
+ limit: zod
+ .number()
+ .min(1)
+ .max(ingestionWarningsV2ListQueryLimitMax)
+ .optional()
+ .describe('Maximum number of warning types to return (default 100).'),
+ order_by: zod
+ .enum(['count', 'last_seen'])
+ .optional()
+ .describe(
+ "Sort order for warning types: 'count' (most frequent first, the default) or 'last_seen' (most recent first).\n\n\* `count` - count\n\* `last_seen` - last_seen"
+ ),
+ q: zod
+ .string()
+ .min(1)
+ .optional()
+ .describe(
+ 'Only return warnings whose type or details contain this substring (case-sensitive). Useful for finding warnings about a specific distinct ID, event or property.'
+ ),
+ samples: zod
+ .number()
+ .min(1)
+ .max(ingestionWarningsV2ListQuerySamplesMax)
+ .optional()
+ .describe('Maximum number of recent sample warnings to return per warning type (default 5).'),
+ severity: zod
+ .enum(['info', 'warning', 'error'])
+ .optional()
+ .describe(
+ "Only return warnings with this severity. Warnings from producers that don't yet emit a severity have severity 'warning'.\n\n\* `info` - info\n\* `warning` - warning\n\* `error` - error"
+ ),
+ since: zod
+ .string()
+ .min(1)
+ .optional()
+ .describe(
+ "Start of the time range, as an ISO 8601 datetime (e.g. '2026-07-01T00:00:00Z') or a relative duration (e.g. '-24h', '-7d'). Defaults to 24 hours ago. Warnings are retained for 90 days."
+ ),
+ type: zod
+ .string()
+ .min(1)
+ .optional()
+ .describe(
+ "Only return warnings of this type (e.g. 'message_size_too_large', 'cannot_merge_already_identified')."
+ ),
+ until: zod
+ .string()
+ .min(1)
+ .optional()
+ .describe(
+ "End of the time range, as an ISO 8601 datetime or a relative duration (e.g. '-1h'). Defaults to now."
+ ),
+ })
diff --git a/services/mcp/src/generated/data_quality/api.ts b/services/mcp/src/generated/data_quality/api.ts
index c5d3d5585a9c..8d30ff1b7157 100644
--- a/services/mcp/src/generated/data_quality/api.ts
+++ b/services/mcp/src/generated/data_quality/api.ts
@@ -11,7 +11,7 @@ import * as zod from 'zod'
/**
* Create a check on this table or view, or refine the one already carrying the same fingerprint. Re-creating a semantically identical check returns 200 and the existing row, never a duplicate.
*/
-export const WarehouseSavedQueriesChecksCreateParams = /* @__PURE__ */ zod.object({
+export const WarehouseSavedQueriesChecksCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -32,7 +32,7 @@ export const warehouseSavedQueriesChecksCreateBodyAiModelMax = 128
export const warehouseSavedQueriesChecksCreateBodyConfidenceMin = 0
export const warehouseSavedQueriesChecksCreateBodyConfidenceMax = 1
-export const WarehouseSavedQueriesChecksCreateBody = /* @__PURE__ */ zod
+export const WarehouseSavedQueriesChecksCreateBody = () => zod
.object({
name: zod
.union([
@@ -96,7 +96,7 @@ export const WarehouseSavedQueriesChecksCreateBody = /* @__PURE__ */ zod
/**
* Edit this check in place, including what it asserts (check_type, column_name, config). The table or view it audits is fixed, and the check keeps its id, run history, latest status, and latest run time. A definition or name already held by another active check comes back as a field error, with nothing written.
*/
-export const WarehouseSavedQueriesChecksPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const WarehouseSavedQueriesChecksPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this data quality check.'),
project_id: zod
.string()
@@ -118,7 +118,7 @@ export const warehouseSavedQueriesChecksPartialUpdateBodyAiModelMax = 128
export const warehouseSavedQueriesChecksPartialUpdateBodyConfidenceMin = 0
export const warehouseSavedQueriesChecksPartialUpdateBodyConfidenceMax = 1
-export const WarehouseSavedQueriesChecksPartialUpdateBody = /* @__PURE__ */ zod
+export const WarehouseSavedQueriesChecksPartialUpdateBody = () => zod
.object({
name: zod
.union([
@@ -183,7 +183,7 @@ export const WarehouseSavedQueriesChecksPartialUpdateBody = /* @__PURE__ */ zod
/**
* CRUD for one subject's checks, plus the actions that run them and report on them.
*/
-export const WarehouseSavedQueriesChecksDestroyParams = /* @__PURE__ */ zod.object({
+export const WarehouseSavedQueriesChecksDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this data quality check.'),
project_id: zod
.string()
@@ -196,7 +196,7 @@ export const WarehouseSavedQueriesChecksDestroyParams = /* @__PURE__ */ zod.obje
/**
* Run this check now. Returns the suite run to poll for the report.
*/
-export const WarehouseSavedQueriesChecksRunCreateParams = /* @__PURE__ */ zod.object({
+export const WarehouseSavedQueriesChecksRunCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this data quality check.'),
project_id: zod
.string()
@@ -209,7 +209,7 @@ export const WarehouseSavedQueriesChecksRunCreateParams = /* @__PURE__ */ zod.ob
/**
* Recent run history for this check, newest first.
*/
-export const WarehouseSavedQueriesChecksRunsListParams = /* @__PURE__ */ zod.object({
+export const WarehouseSavedQueriesChecksRunsListParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this data quality check.'),
project_id: zod
.string()
@@ -222,7 +222,7 @@ export const WarehouseSavedQueriesChecksRunsListParams = /* @__PURE__ */ zod.obj
/**
* The check types this project can author, with the JSON schema of each type's config.
*/
-export const WarehouseSavedQueriesChecksCheckTypesListParams = /* @__PURE__ */ zod.object({
+export const WarehouseSavedQueriesChecksCheckTypesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -234,7 +234,7 @@ export const WarehouseSavedQueriesChecksCheckTypesListParams = /* @__PURE__ */ z
/**
* Create a check on this table or view, or refine the one already carrying the same fingerprint. Re-creating a semantically identical check returns 200 and the existing row, never a duplicate.
*/
-export const WarehouseTablesChecksCreateParams = /* @__PURE__ */ zod.object({
+export const WarehouseTablesChecksCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -255,7 +255,7 @@ export const warehouseTablesChecksCreateBodyAiModelMax = 128
export const warehouseTablesChecksCreateBodyConfidenceMin = 0
export const warehouseTablesChecksCreateBodyConfidenceMax = 1
-export const WarehouseTablesChecksCreateBody = /* @__PURE__ */ zod
+export const WarehouseTablesChecksCreateBody = () => zod
.object({
name: zod
.union([
@@ -319,7 +319,7 @@ export const WarehouseTablesChecksCreateBody = /* @__PURE__ */ zod
/**
* Edit this check in place, including what it asserts (check_type, column_name, config). The table or view it audits is fixed, and the check keeps its id, run history, latest status, and latest run time. A definition or name already held by another active check comes back as a field error, with nothing written.
*/
-export const WarehouseTablesChecksPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const WarehouseTablesChecksPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this data quality check.'),
project_id: zod
.string()
@@ -341,7 +341,7 @@ export const warehouseTablesChecksPartialUpdateBodyAiModelMax = 128
export const warehouseTablesChecksPartialUpdateBodyConfidenceMin = 0
export const warehouseTablesChecksPartialUpdateBodyConfidenceMax = 1
-export const WarehouseTablesChecksPartialUpdateBody = /* @__PURE__ */ zod
+export const WarehouseTablesChecksPartialUpdateBody = () => zod
.object({
name: zod
.union([
@@ -406,7 +406,7 @@ export const WarehouseTablesChecksPartialUpdateBody = /* @__PURE__ */ zod
/**
* CRUD for one subject's checks, plus the actions that run them and report on them.
*/
-export const WarehouseTablesChecksDestroyParams = /* @__PURE__ */ zod.object({
+export const WarehouseTablesChecksDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this data quality check.'),
project_id: zod
.string()
@@ -419,7 +419,7 @@ export const WarehouseTablesChecksDestroyParams = /* @__PURE__ */ zod.object({
/**
* Run this check now. Returns the suite run to poll for the report.
*/
-export const WarehouseTablesChecksRunCreateParams = /* @__PURE__ */ zod.object({
+export const WarehouseTablesChecksRunCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this data quality check.'),
project_id: zod
.string()
@@ -432,7 +432,7 @@ export const WarehouseTablesChecksRunCreateParams = /* @__PURE__ */ zod.object({
/**
* Recent run history for this check, newest first.
*/
-export const WarehouseTablesChecksRunsListParams = /* @__PURE__ */ zod.object({
+export const WarehouseTablesChecksRunsListParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this data quality check.'),
project_id: zod
.string()
diff --git a/services/mcp/src/generated/data_warehouse/api.ts b/services/mcp/src/generated/data_warehouse/api.ts
index 14ee6644f72d..01227b319812 100644
--- a/services/mcp/src/generated/data_warehouse/api.ts
+++ b/services/mcp/src/generated/data_warehouse/api.ts
@@ -12,7 +12,7 @@ import * as zod from 'zod'
* Get tenant-safe live worker, session, queue, and capacity data for the current organization.
* @summary Get managed warehouse monitoring snapshot
*/
-export const DataWarehouseManagedWarehouseMonitoringRetrieveParams = /* @__PURE__ */ zod.object({
+export const DataWarehouseManagedWarehouseMonitoringRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -24,7 +24,7 @@ export const DataWarehouseManagedWarehouseMonitoringRetrieveParams = /* @__PURE_
* Get one allow-listed monitoring metric for the current organization and trailing time window.
* @summary Get managed warehouse monitoring time series
*/
-export const DataWarehouseManagedWarehouseMonitoringTimeseriesRetrieveParams = /* @__PURE__ */ zod.object({
+export const DataWarehouseManagedWarehouseMonitoringTimeseriesRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -34,7 +34,7 @@ export const DataWarehouseManagedWarehouseMonitoringTimeseriesRetrieveParams = /
export const dataWarehouseManagedWarehouseMonitoringTimeseriesRetrieveQueryWindowDefault = `24h`
-export const DataWarehouseManagedWarehouseMonitoringTimeseriesRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const DataWarehouseManagedWarehouseMonitoringTimeseriesRetrieveQueryParams = () => zod.object({
metric: zod
.enum([
'query_rate',
@@ -58,7 +58,7 @@ export const DataWarehouseManagedWarehouseMonitoringTimeseriesRetrieveQueryParam
),
})
-export const InsightVariablesCreateParams = /* @__PURE__ */ zod.object({
+export const InsightVariablesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -68,7 +68,7 @@ export const InsightVariablesCreateParams = /* @__PURE__ */ zod.object({
export const insightVariablesCreateBodyNameMax = 400
-export const InsightVariablesCreateBody = /* @__PURE__ */ zod.object({
+export const InsightVariablesCreateBody = () => zod.object({
name: zod.string().max(insightVariablesCreateBodyNameMax).describe('Human-readable name for the SQL variable.'),
type: zod
.enum(['String', 'Number', 'Boolean', 'List', 'Date'])
@@ -93,7 +93,7 @@ export const InsightVariablesCreateBody = /* @__PURE__ */ zod.object({
.describe('ID of the external data source connection values_query runs against. Null runs it against PostHog.'),
})
-export const InsightVariablesPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const InsightVariablesPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this insight variable.'),
project_id: zod
.string()
@@ -104,7 +104,7 @@ export const InsightVariablesPartialUpdateParams = /* @__PURE__ */ zod.object({
export const insightVariablesPartialUpdateBodyNameMax = 400
-export const InsightVariablesPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const InsightVariablesPartialUpdateBody = () => zod.object({
name: zod
.string()
.max(insightVariablesPartialUpdateBodyNameMax)
@@ -134,7 +134,7 @@ export const InsightVariablesPartialUpdateBody = /* @__PURE__ */ zod.object({
.describe('ID of the external data source connection values_query runs against. Null runs it against PostHog.'),
})
-export const InsightVariablesDestroyParams = /* @__PURE__ */ zod.object({
+export const InsightVariablesDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this insight variable.'),
project_id: zod
.string()
@@ -150,7 +150,7 @@ export const InsightVariablesDestroyParams = /* @__PURE__ */ zod.object({
* user edit (`is_user_edited=True`), which protects the row from being overwritten by automatic
* enrichment. Create upserts on `(saved_query, column_name)`; the view cannot be changed after creation.
*/
-export const SavedQueryColumnAnnotationsListParams = /* @__PURE__ */ zod.object({
+export const SavedQueryColumnAnnotationsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -158,7 +158,7 @@ export const SavedQueryColumnAnnotationsListParams = /* @__PURE__ */ zod.object(
),
})
-export const SavedQueryColumnAnnotationsListQueryParams = /* @__PURE__ */ zod.object({
+export const SavedQueryColumnAnnotationsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
saved_query_id: zod
@@ -174,7 +174,7 @@ export const SavedQueryColumnAnnotationsListQueryParams = /* @__PURE__ */ zod.ob
* user edit (`is_user_edited=True`), which protects the row from being overwritten by automatic
* enrichment. Create upserts on `(saved_query, column_name)`; the view cannot be changed after creation.
*/
-export const SavedQueryColumnAnnotationsCreateParams = /* @__PURE__ */ zod.object({
+export const SavedQueryColumnAnnotationsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -182,7 +182,7 @@ export const SavedQueryColumnAnnotationsCreateParams = /* @__PURE__ */ zod.objec
),
})
-export const SavedQueryColumnAnnotationsCreateBody = /* @__PURE__ */ zod
+export const SavedQueryColumnAnnotationsCreateBody = () => zod
.object({
saved_query: zod.string().describe('ID of the data warehouse saved query (view) this annotation describes.'),
column_name: zod
@@ -206,7 +206,7 @@ export const SavedQueryColumnAnnotationsCreateBody = /* @__PURE__ */ zod
* user edit (`is_user_edited=True`), which protects the row from being overwritten by automatic
* enrichment. Create upserts on `(table, column_name)`; the table cannot be changed after creation.
*/
-export const WarehouseColumnAnnotationsListParams = /* @__PURE__ */ zod.object({
+export const WarehouseColumnAnnotationsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -214,7 +214,7 @@ export const WarehouseColumnAnnotationsListParams = /* @__PURE__ */ zod.object({
),
})
-export const WarehouseColumnAnnotationsListQueryParams = /* @__PURE__ */ zod.object({
+export const WarehouseColumnAnnotationsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
table_id: zod.string().optional().describe('Only return annotations for this data warehouse table.'),
@@ -227,7 +227,7 @@ export const WarehouseColumnAnnotationsListQueryParams = /* @__PURE__ */ zod.obj
* user edit (`is_user_edited=True`), which protects the row from being overwritten by automatic
* enrichment. Create upserts on `(table, column_name)`; the table cannot be changed after creation.
*/
-export const WarehouseColumnAnnotationsCreateParams = /* @__PURE__ */ zod.object({
+export const WarehouseColumnAnnotationsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -235,7 +235,7 @@ export const WarehouseColumnAnnotationsCreateParams = /* @__PURE__ */ zod.object
),
})
-export const WarehouseColumnAnnotationsCreateBody = /* @__PURE__ */ zod
+export const WarehouseColumnAnnotationsCreateBody = () => zod
.object({
table: zod.string().describe('ID of the data warehouse table this annotation describes.'),
column_name: zod
@@ -259,7 +259,7 @@ export const WarehouseColumnAnnotationsCreateBody = /* @__PURE__ */ zod
* user edit (`is_user_edited=True`), which protects the row from being overwritten by automatic
* enrichment. Create upserts on `(table, column_name)`; the table cannot be changed after creation.
*/
-export const WarehouseColumnAnnotationsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const WarehouseColumnAnnotationsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this warehouse column annotation.'),
project_id: zod
.string()
@@ -268,7 +268,7 @@ export const WarehouseColumnAnnotationsPartialUpdateParams = /* @__PURE__ */ zod
),
})
-export const WarehouseColumnAnnotationsPartialUpdateBody = /* @__PURE__ */ zod
+export const WarehouseColumnAnnotationsPartialUpdateBody = () => zod
.object({
table: zod.string().optional().describe('ID of the data warehouse table this annotation describes.'),
column_name: zod
@@ -289,7 +289,7 @@ export const WarehouseColumnAnnotationsPartialUpdateBody = /* @__PURE__ */ zod
/**
* Create, Read, Update and Delete Warehouse Tables.
*/
-export const WarehouseSavedQueriesListParams = /* @__PURE__ */ zod.object({
+export const WarehouseSavedQueriesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -297,7 +297,7 @@ export const WarehouseSavedQueriesListParams = /* @__PURE__ */ zod.object({
),
})
-export const WarehouseSavedQueriesListQueryParams = /* @__PURE__ */ zod.object({
+export const WarehouseSavedQueriesListQueryParams = () => zod.object({
page: zod.number().optional().describe('A page number within the paginated result set.'),
search: zod.string().optional().describe('A search term.'),
})
@@ -305,7 +305,7 @@ export const WarehouseSavedQueriesListQueryParams = /* @__PURE__ */ zod.object({
/**
* Create, Read, Update and Delete Warehouse Tables.
*/
-export const WarehouseSavedQueriesCreateParams = /* @__PURE__ */ zod.object({
+export const WarehouseSavedQueriesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -321,7 +321,7 @@ export const warehouseSavedQueriesCreateBodyIncrementalOneLookbackSecondsDefault
export const warehouseSavedQueriesCreateBodyIncrementalOneLookbackSecondsMin = 0
export const warehouseSavedQueriesCreateBodyIncrementalOneLookbackSecondsMax = 2592000
-export const WarehouseSavedQueriesCreateBody = /* @__PURE__ */ zod
+export const WarehouseSavedQueriesCreateBody = () => zod
.object({
name: zod
.string()
@@ -404,7 +404,7 @@ export const WarehouseSavedQueriesCreateBody = /* @__PURE__ */ zod
/**
* Create, Read, Update and Delete Warehouse Tables.
*/
-export const WarehouseSavedQueriesRetrieveParams = /* @__PURE__ */ zod.object({
+export const WarehouseSavedQueriesRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this data warehouse saved query.'),
project_id: zod
.string()
@@ -416,7 +416,7 @@ export const WarehouseSavedQueriesRetrieveParams = /* @__PURE__ */ zod.object({
/**
* Create, Read, Update and Delete Warehouse Tables.
*/
-export const WarehouseSavedQueriesPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const WarehouseSavedQueriesPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this data warehouse saved query.'),
project_id: zod
.string()
@@ -433,7 +433,7 @@ export const warehouseSavedQueriesPartialUpdateBodyIncrementalOneLookbackSeconds
export const warehouseSavedQueriesPartialUpdateBodyIncrementalOneLookbackSecondsMin = 0
export const warehouseSavedQueriesPartialUpdateBodyIncrementalOneLookbackSecondsMax = 2592000
-export const WarehouseSavedQueriesPartialUpdateBody = /* @__PURE__ */ zod
+export const WarehouseSavedQueriesPartialUpdateBody = () => zod
.object({
name: zod
.string()
@@ -522,7 +522,7 @@ export const WarehouseSavedQueriesPartialUpdateBody = /* @__PURE__ */ zod
/**
* Create, Read, Update and Delete Warehouse Tables.
*/
-export const WarehouseSavedQueriesDestroyParams = /* @__PURE__ */ zod.object({
+export const WarehouseSavedQueriesDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this data warehouse saved query.'),
project_id: zod
.string()
@@ -534,7 +534,7 @@ export const WarehouseSavedQueriesDestroyParams = /* @__PURE__ */ zod.object({
/**
* Enable materialization for this saved query, at the requested sync frequency or daily.
*/
-export const WarehouseSavedQueriesMaterializeCreateParams = /* @__PURE__ */ zod.object({
+export const WarehouseSavedQueriesMaterializeCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this data warehouse saved query.'),
project_id: zod
.string()
@@ -545,7 +545,7 @@ export const WarehouseSavedQueriesMaterializeCreateParams = /* @__PURE__ */ zod.
export const warehouseSavedQueriesMaterializeCreateBodySyncFrequencyDefault = `24hour`
-export const WarehouseSavedQueriesMaterializeCreateBody = /* @__PURE__ */ zod
+export const WarehouseSavedQueriesMaterializeCreateBody = () => zod
.object({
sync_frequency: zod
.enum(['15min', '30min', '1hour', '6hour', '12hour', '24hour', '7day', '30day'])
@@ -563,7 +563,7 @@ export const WarehouseSavedQueriesMaterializeCreateBody = /* @__PURE__ */ zod
* Undo materialization, revert back to the original view.
* (i.e. delete the materialized table and the schedule)
*/
-export const WarehouseSavedQueriesRevertMaterializationCreateParams = /* @__PURE__ */ zod.object({
+export const WarehouseSavedQueriesRevertMaterializationCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this data warehouse saved query.'),
project_id: zod
.string()
@@ -580,7 +580,7 @@ export const warehouseSavedQueriesRevertMaterializationCreateBodyIncrementalOneL
export const warehouseSavedQueriesRevertMaterializationCreateBodyIncrementalOneLookbackSecondsMin = 0
export const warehouseSavedQueriesRevertMaterializationCreateBodyIncrementalOneLookbackSecondsMax = 2592000
-export const WarehouseSavedQueriesRevertMaterializationCreateBody = /* @__PURE__ */ zod
+export const WarehouseSavedQueriesRevertMaterializationCreateBody = () => zod
.object({
deleted: zod.boolean().nullish(),
name: zod
@@ -676,7 +676,7 @@ export const WarehouseSavedQueriesRevertMaterializationCreateBody = /* @__PURE__
/**
* Run this saved query.
*/
-export const WarehouseSavedQueriesRunCreateParams = /* @__PURE__ */ zod.object({
+export const WarehouseSavedQueriesRunCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this data warehouse saved query.'),
project_id: zod
.string()
@@ -687,7 +687,7 @@ export const WarehouseSavedQueriesRunCreateParams = /* @__PURE__ */ zod.object({
export const warehouseSavedQueriesRunCreateBodyFullRefreshDefault = false
-export const WarehouseSavedQueriesRunCreateBody = /* @__PURE__ */ zod
+export const WarehouseSavedQueriesRunCreateBody = () => zod
.object({
full_refresh: zod
.boolean()
@@ -701,7 +701,7 @@ export const WarehouseSavedQueriesRunCreateBody = /* @__PURE__ */ zod
/**
* Return the recent run history (up to 5 most recent) for this materialized view.
*/
-export const WarehouseSavedQueriesRunHistoryRetrieveParams = /* @__PURE__ */ zod.object({
+export const WarehouseSavedQueriesRunHistoryRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this data warehouse saved query.'),
project_id: zod
.string()
@@ -713,7 +713,7 @@ export const WarehouseSavedQueriesRunHistoryRetrieveParams = /* @__PURE__ */ zod
/**
* Create, Read, Update and Delete Warehouse Tables.
*/
-export const WarehouseTablesCreateParams = /* @__PURE__ */ zod.object({
+export const WarehouseTablesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -737,7 +737,7 @@ export const warehouseTablesCreateBodyCredentialAccessKeyMax = 500
export const warehouseTablesCreateBodyCredentialAccessSecretMax = 500
-export const WarehouseTablesCreateBody = /* @__PURE__ */ zod
+export const WarehouseTablesCreateBody = () => zod
.object({
deleted: zod.boolean().nullish().describe('Whether the table is soft-deleted and hidden from queries.'),
name: zod
@@ -826,7 +826,7 @@ export const WarehouseTablesCreateBody = /* @__PURE__ */ zod
* Re-introspect a self-managed (manually linked) warehouse table's schema from its underlying source files and overwrite its stored column list. Use when the source schema has evolved (e.g. new columns in the underlying Delta/Parquet/CSV files) but queries still can't see the new columns, because PostHog serves a cached column snapshot until the table is refreshed. Not for tables managed by an external data source sync — those refresh on their own schedule.
* @summary Refresh table schema from source
*/
-export const WarehouseTablesRefreshSchemaCreateParams = /* @__PURE__ */ zod.object({
+export const WarehouseTablesRefreshSchemaCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this data warehouse table.'),
project_id: zod
.string()
diff --git a/services/mcp/src/generated/docs/api.ts b/services/mcp/src/generated/docs/api.ts
index 613493924478..84f02be6ecd7 100644
--- a/services/mcp/src/generated/docs/api.ts
+++ b/services/mcp/src/generated/docs/api.ts
@@ -12,7 +12,7 @@ import * as zod from 'zod'
* Run a hybrid (semantic + full-text) RAG search over the PostHog documentation via Inkeep. Returns a markdown body with title, URL, and excerpt for each match for the agent to cite back to the user.
* @summary Search PostHog documentation
*/
-export const DocsSearchParams = /* @__PURE__ */ zod.object({
+export const DocsSearchParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -20,7 +20,7 @@ export const DocsSearchParams = /* @__PURE__ */ zod.object({
),
})
-export const DocsSearchBody = /* @__PURE__ */ zod.object({
+export const DocsSearchBody = () => zod.object({
query: zod
.string()
.describe(
diff --git a/services/mcp/src/generated/early_access_features/api.ts b/services/mcp/src/generated/early_access_features/api.ts
index 9b2b6694c812..847644403fac 100644
--- a/services/mcp/src/generated/early_access_features/api.ts
+++ b/services/mcp/src/generated/early_access_features/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const EarlyAccessFeatureListParams = /* @__PURE__ */ zod.object({
+export const EarlyAccessFeatureListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,12 +16,12 @@ export const EarlyAccessFeatureListParams = /* @__PURE__ */ zod.object({
),
})
-export const EarlyAccessFeatureListQueryParams = /* @__PURE__ */ zod.object({
+export const EarlyAccessFeatureListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const EarlyAccessFeatureCreateParams = /* @__PURE__ */ zod.object({
+export const EarlyAccessFeatureCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -35,7 +35,7 @@ export const earlyAccessFeatureCreateBodyDocumentationUrlOneMax = 800
export const earlyAccessFeatureCreateBodyDocumentationUrlTwoMax = 0
-export const EarlyAccessFeatureCreateBody = /* @__PURE__ */ zod
+export const EarlyAccessFeatureCreateBody = () => zod
.object({
name: zod.string().max(earlyAccessFeatureCreateBodyNameMax).describe('The name of the early access feature.'),
description: zod
@@ -68,7 +68,7 @@ export const EarlyAccessFeatureCreateBody = /* @__PURE__ */ zod
})
.describe('Mixin for serializers to add user access control fields')
-export const EarlyAccessFeatureRetrieveParams = /* @__PURE__ */ zod.object({
+export const EarlyAccessFeatureRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this early access feature.'),
project_id: zod
.string()
@@ -77,7 +77,7 @@ export const EarlyAccessFeatureRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const EarlyAccessFeaturePartialUpdateParams = /* @__PURE__ */ zod.object({
+export const EarlyAccessFeaturePartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this early access feature.'),
project_id: zod
.string()
@@ -92,7 +92,7 @@ export const earlyAccessFeaturePartialUpdateBodyDocumentationUrlOneMax = 800
export const earlyAccessFeaturePartialUpdateBodyDocumentationUrlTwoMax = 0
-export const EarlyAccessFeaturePartialUpdateBody = /* @__PURE__ */ zod
+export const EarlyAccessFeaturePartialUpdateBody = () => zod
.object({
name: zod
.string()
@@ -122,7 +122,7 @@ export const EarlyAccessFeaturePartialUpdateBody = /* @__PURE__ */ zod
})
.describe('Mixin for serializers to add user access control fields')
-export const EarlyAccessFeatureDestroyParams = /* @__PURE__ */ zod.object({
+export const EarlyAccessFeatureDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this early access feature.'),
project_id: zod
.string()
diff --git a/services/mcp/src/generated/email_templates/api.ts b/services/mcp/src/generated/email_templates/api.ts
index 1bbe26d96411..8155c6614b53 100644
--- a/services/mcp/src/generated/email_templates/api.ts
+++ b/services/mcp/src/generated/email_templates/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const MessagingTemplatesListParams = /* @__PURE__ */ zod.object({
+export const MessagingTemplatesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,12 +16,12 @@ export const MessagingTemplatesListParams = /* @__PURE__ */ zod.object({
),
})
-export const MessagingTemplatesListQueryParams = /* @__PURE__ */ zod.object({
+export const MessagingTemplatesListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const MessagingTemplatesCreateParams = /* @__PURE__ */ zod.object({
+export const MessagingTemplatesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -34,7 +34,7 @@ export const messagingTemplatesCreateBodyNameMax = 400
export const messagingTemplatesCreateBodyContentOneTemplatingDefault = `liquid`
export const messagingTemplatesCreateBodyTypeMax = 24
-export const MessagingTemplatesCreateBody = /* @__PURE__ */ zod.object({
+export const MessagingTemplatesCreateBody = () => zod.object({
name: zod
.string()
.max(messagingTemplatesCreateBodyNameMax)
@@ -112,7 +112,7 @@ export const MessagingTemplatesCreateBody = /* @__PURE__ */ zod.object({
deleted: zod.boolean().optional().describe('Soft-delete flag. Set true to remove the template from the library.'),
})
-export const MessagingTemplatesRetrieveParams = /* @__PURE__ */ zod.object({
+export const MessagingTemplatesRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this message template.'),
project_id: zod
.string()
@@ -121,7 +121,7 @@ export const MessagingTemplatesRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const MessagingTemplatesPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const MessagingTemplatesPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this message template.'),
project_id: zod
.string()
@@ -135,7 +135,7 @@ export const messagingTemplatesPartialUpdateBodyNameMax = 400
export const messagingTemplatesPartialUpdateBodyContentOneTemplatingDefault = `liquid`
export const messagingTemplatesPartialUpdateBodyTypeMax = 24
-export const MessagingTemplatesPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const MessagingTemplatesPartialUpdateBody = () => zod.object({
name: zod
.string()
.max(messagingTemplatesPartialUpdateBodyNameMax)
@@ -214,7 +214,7 @@ export const MessagingTemplatesPartialUpdateBody = /* @__PURE__ */ zod.object({
deleted: zod.boolean().optional().describe('Soft-delete flag. Set true to remove the template from the library.'),
})
-export const MessagingTemplatesDesignPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const MessagingTemplatesDesignPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this message template.'),
project_id: zod
.string()
@@ -223,7 +223,7 @@ export const MessagingTemplatesDesignPartialUpdateParams = /* @__PURE__ */ zod.o
),
})
-export const MessagingTemplatesDesignPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const MessagingTemplatesDesignPartialUpdateBody = () => zod.object({
operations: zod
.array(
zod.object({
diff --git a/services/mcp/src/generated/endpoints/api.ts b/services/mcp/src/generated/endpoints/api.ts
index 1eef04bd65a0..ac7b02c83e23 100644
--- a/services/mcp/src/generated/endpoints/api.ts
+++ b/services/mcp/src/generated/endpoints/api.ts
@@ -11,7 +11,7 @@ import * as zod from 'zod'
/**
* List all endpoints for the team.
*/
-export const EndpointsListParams = /* @__PURE__ */ zod.object({
+export const EndpointsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -19,7 +19,7 @@ export const EndpointsListParams = /* @__PURE__ */ zod.object({
),
})
-export const EndpointsListQueryParams = /* @__PURE__ */ zod.object({
+export const EndpointsListQueryParams = () => zod.object({
created_by: zod.number().optional(),
is_active: zod.boolean().optional(),
limit: zod.number().optional().describe('Number of results to return per page.'),
@@ -29,7 +29,7 @@ export const EndpointsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Create a new endpoint.
*/
-export const EndpointsCreateParams = /* @__PURE__ */ zod.object({
+export const EndpointsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -37,7 +37,7 @@ export const EndpointsCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const EndpointsCreateBody = /* @__PURE__ */ zod
+export const EndpointsCreateBody = () => zod
.object({
name: zod
.string()
@@ -89,7 +89,7 @@ export const EndpointsCreateBody = /* @__PURE__ */ zod
/**
* Retrieve an endpoint, or a specific version via ?version=N.
*/
-export const EndpointsRetrieveParams = /* @__PURE__ */ zod.object({
+export const EndpointsRetrieveParams = () => zod.object({
name: zod.string(),
project_id: zod
.string()
@@ -101,7 +101,7 @@ export const EndpointsRetrieveParams = /* @__PURE__ */ zod.object({
/**
* Update an existing endpoint.
*/
-export const EndpointsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const EndpointsPartialUpdateParams = () => zod.object({
name: zod.string(),
project_id: zod
.string()
@@ -110,7 +110,7 @@ export const EndpointsPartialUpdateParams = /* @__PURE__ */ zod.object({
),
})
-export const EndpointsPartialUpdateBody = /* @__PURE__ */ zod
+export const EndpointsPartialUpdateBody = () => zod
.object({
name: zod
.string()
@@ -162,7 +162,7 @@ export const EndpointsPartialUpdateBody = /* @__PURE__ */ zod
/**
* Delete an endpoint and clean up materialized query.
*/
-export const EndpointsDestroyParams = /* @__PURE__ */ zod.object({
+export const EndpointsDestroyParams = () => zod.object({
name: zod.string(),
project_id: zod
.string()
@@ -171,7 +171,7 @@ export const EndpointsDestroyParams = /* @__PURE__ */ zod.object({
),
})
-export const EndpointsLogsRetrieveParams = /* @__PURE__ */ zod.object({
+export const EndpointsLogsRetrieveParams = () => zod.object({
name: zod.string(),
project_id: zod
.string()
@@ -183,7 +183,7 @@ export const EndpointsLogsRetrieveParams = /* @__PURE__ */ zod.object({
export const endpointsLogsRetrieveQueryLimitDefault = 50
export const endpointsLogsRetrieveQueryLimitMax = 500
-export const EndpointsLogsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const EndpointsLogsRetrieveQueryParams = () => zod.object({
after: zod.iso
.datetime({ offset: true })
.optional()
@@ -214,7 +214,7 @@ export const EndpointsLogsRetrieveQueryParams = /* @__PURE__ */ zod.object({
/**
* Preview the materialization transform for an endpoint. Shows what the query will look like after materialization, including range pair detection and bucket functions.
*/
-export const EndpointsMaterializationPreviewCreateParams = /* @__PURE__ */ zod.object({
+export const EndpointsMaterializationPreviewCreateParams = () => zod.object({
name: zod.string(),
project_id: zod
.string()
@@ -223,7 +223,7 @@ export const EndpointsMaterializationPreviewCreateParams = /* @__PURE__ */ zod.o
),
})
-export const EndpointsMaterializationPreviewCreateBody = /* @__PURE__ */ zod.object({
+export const EndpointsMaterializationPreviewCreateBody = () => zod.object({
version: zod.number().optional(),
bucket_overrides: zod
.record(zod.string(), zod.string())
@@ -234,7 +234,7 @@ export const EndpointsMaterializationPreviewCreateBody = /* @__PURE__ */ zod.obj
/**
* Get materialization status for an endpoint. Supports ?version=N query param.
*/
-export const EndpointsMaterializationStatusRetrieveParams = /* @__PURE__ */ zod.object({
+export const EndpointsMaterializationStatusRetrieveParams = () => zod.object({
name: zod.string(),
project_id: zod
.string()
@@ -246,7 +246,7 @@ export const EndpointsMaterializationStatusRetrieveParams = /* @__PURE__ */ zod.
/**
* Ask AI to rewrite the endpoint's query into a semantically equivalent form that can be materialized. Only applicable to SQL (HogQL) endpoints that currently fail the materialization checks. The suggestion is validated against the live checks before being returned; nothing is saved. Requires the organization's AI data processing approval.
*/
-export const EndpointsMaterializationSuggestionCreateParams = /* @__PURE__ */ zod.object({
+export const EndpointsMaterializationSuggestionCreateParams = () => zod.object({
name: zod.string(),
project_id: zod
.string()
@@ -255,7 +255,7 @@ export const EndpointsMaterializationSuggestionCreateParams = /* @__PURE__ */ zo
),
})
-export const EndpointsMaterializationSuggestionCreateBody = /* @__PURE__ */ zod
+export const EndpointsMaterializationSuggestionCreateBody = () => zod
.object({
version: zod
.number()
@@ -267,7 +267,7 @@ export const EndpointsMaterializationSuggestionCreateBody = /* @__PURE__ */ zod
/**
* Get OpenAPI 3.0 specification for this endpoint. Use this to generate typed SDK clients.
*/
-export const EndpointsOpenapiSpecRetrieveParams = /* @__PURE__ */ zod.object({
+export const EndpointsOpenapiSpecRetrieveParams = () => zod.object({
name: zod.string(),
project_id: zod
.string()
@@ -276,7 +276,7 @@ export const EndpointsOpenapiSpecRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const EndpointsOpenapiSpecRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const EndpointsOpenapiSpecRetrieveQueryParams = () => zod.object({
version: zod
.number()
.optional()
@@ -286,7 +286,7 @@ export const EndpointsOpenapiSpecRetrieveQueryParams = /* @__PURE__ */ zod.objec
/**
* Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.
*/
-export const EndpointsRunCreateParams = /* @__PURE__ */ zod.object({
+export const EndpointsRunCreateParams = () => zod.object({
name: zod.string(),
project_id: zod
.string()
@@ -333,7 +333,7 @@ export const endpointsRunCreateBodyFiltersOverrideOnePropertiesOneItemTwofourEve
export const endpointsRunCreateBodyFiltersOverrideOnePropertiesOneItemTwofourTypeDefault = `behavioral`
export const endpointsRunCreateBodyRefreshDefault = `cache`
-export const EndpointsRunCreateBody = /* @__PURE__ */ zod.object({
+export const EndpointsRunCreateBody = () => zod.object({
client_query_id: zod
.union([zod.string(), zod.null()])
.optional()
@@ -2083,7 +2083,7 @@ export const EndpointsRunCreateBody = /* @__PURE__ */ zod.object({
/**
* List all versions for an endpoint.
*/
-export const EndpointsVersionsListParams = /* @__PURE__ */ zod.object({
+export const EndpointsVersionsListParams = () => zod.object({
name: zod.string(),
project_id: zod
.string()
@@ -2092,7 +2092,7 @@ export const EndpointsVersionsListParams = /* @__PURE__ */ zod.object({
),
})
-export const EndpointsVersionsListQueryParams = /* @__PURE__ */ zod.object({
+export const EndpointsVersionsListQueryParams = () => zod.object({
created_by: zod.number().optional(),
is_active: zod.boolean().optional(),
limit: zod.number().optional().describe('Number of results to return per page.'),
@@ -2102,7 +2102,7 @@ export const EndpointsVersionsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Get the most recent execution time per endpoint (endpoint-level). Timestamps are recorded by the run path for personal-API-key calls. For per-version usage, query the query_log table directly.
*/
-export const EndpointsLastExecutionTimesCreateParams = /* @__PURE__ */ zod.object({
+export const EndpointsLastExecutionTimesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2110,14 +2110,14 @@ export const EndpointsLastExecutionTimesCreateParams = /* @__PURE__ */ zod.objec
),
})
-export const EndpointsLastExecutionTimesCreateBody = /* @__PURE__ */ zod.object({
+export const EndpointsLastExecutionTimesCreateBody = () => zod.object({
names: zod.array(zod.string()),
})
/**
* Get the source code of the live materialization checks, plus the rewrite contract. Lets an agent rewrite a rejected endpoint query itself: fetch these conditions, produce a semantically equivalent query that passes every check, update the endpoint with it, then confirm via materialization_status. The source is read from the running system, so it always matches the checks this instance enforces.
*/
-export const EndpointsMaterializationConditionsRetrieveParams = /* @__PURE__ */ zod.object({
+export const EndpointsMaterializationConditionsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
diff --git a/services/mcp/src/generated/engineering_analytics/api.ts b/services/mcp/src/generated/engineering_analytics/api.ts
index 9e87e2e83322..15cb5dad977a 100644
--- a/services/mcp/src/generated/engineering_analytics/api.ts
+++ b/services/mcp/src/generated/engineering_analytics/api.ts
@@ -11,7 +11,7 @@ import * as zod from 'zod'
/**
* The broken-tests triage panel: live CI failures over the last 2 days grouped into distinct failures (by test id + normalized error signature) and classified by how each is behaving right now — breaking trunk, blocking the merge queue, a new failure spreading across branches, probably-resolved, flaky, or one PR's own problem — ranked with the most urgent first. A blocking_merge_queue row is a failure on a merge-queue gate branch that never hit trunk: the commit had already passed the PR's own CI, so it is the semantic conflict the queue exists to catch, and it is holding up landings. Also returns breaking_master_jobs, the default-branch jobs whose latest run is red. Reach for this to answer 'what CI failures should I care about right now'; expand a row's latest_run_id via run_failure_logs for the failing lines. Fingerprinting is pytest-only for now (jest/playwright/cargo failures aren't grouped yet), and the breaking/resolved distinction needs the job-level source synced — without it those failures fall through to flaky/pr_only rather than being misreported.
*/
-export const EngineeringAnalyticsBrokenTestsParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsBrokenTestsParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -19,7 +19,7 @@ export const EngineeringAnalyticsBrokenTestsParams = /* @__PURE__ */ zod.object(
),
})
-export const EngineeringAnalyticsBrokenTestsQueryParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsBrokenTestsQueryParams = () => zod.object({
repo: zod
.string()
.optional()
@@ -37,7 +37,7 @@ export const EngineeringAnalyticsBrokenTestsQueryParams = /* @__PURE__ */ zod.ob
/**
* The thinned CI failure logs for a pull request, grouped by failed job. Resolves the PR to its workflow runs via the pull_requests association (all of the PR's pushes, not just the latest commit), then reads the Logs product joined on run_id. Returns failed jobs only (the worker fetches logs for failures); logs_available is false when CI hasn't failed, the logs aged out of the short Logs retention, or a fork PR has no run association. Each line carries its original 1-based line number in the full pre-thinning log; lines are the failure region (errors plus surrounding context, with omission markers), capped per job and overall.
*/
-export const EngineeringAnalyticsCiFailureLogsParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsCiFailureLogsParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -45,7 +45,7 @@ export const EngineeringAnalyticsCiFailureLogsParams = /* @__PURE__ */ zod.objec
),
})
-export const EngineeringAnalyticsCiFailureLogsQueryParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsCiFailureLogsQueryParams = () => zod.object({
pr_number: zod.number().describe('Pull request number whose CI failure logs to fetch.'),
repo: zod.string().describe("'owner\/name' repository the pull request belongs to."),
source_id: zod
@@ -59,7 +59,7 @@ export const EngineeringAnalyticsCiFailureLogsQueryParams = /* @__PURE__ */ zod.
/**
* The active test-health queue: pytest and Jest tests worth acting on now, from the per-test CI spans, over a window (default -7d, maximum 30 days). Evidence is counted per CI run, never per span or run attempt. A test is a 'confirmed_flake' when one commit both failed and passed it (a 'Re-run failed jobs' attempt went green, or an in-job retry recovered it); 'quarantined' when a tolerated failure is recorded while it is masked; otherwise 'suspected_regression'. It qualifies on any same-commit recovery, any master/main failure, a quarantined failure, or failures on at least min_failed_prs distinct PRs. Counts are absolute, never rates: CI emits every failure but omits ordinary passing spans, so there is no execution denominator. 'suspected_regression' means no recovery was recorded in this data, not that the test never flakes.
*/
-export const EngineeringAnalyticsFlakyTestsParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsFlakyTestsParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -67,7 +67,7 @@ export const EngineeringAnalyticsFlakyTestsParams = /* @__PURE__ */ zod.object({
),
})
-export const EngineeringAnalyticsFlakyTestsQueryParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsFlakyTestsQueryParams = () => zod.object({
date_from: zod
.string()
.optional()
@@ -100,7 +100,7 @@ export const EngineeringAnalyticsFlakyTestsQueryParams = /* @__PURE__ */ zod.obj
/**
* Estimated CI cost for a pull request, summed over the jobs of all its workflow runs. Billable self-hosted Linux runners only — provider-hosted (free GitHub-hosted) and non-Linux jobs are excluded. Every figure is zero/null with `jobs_available` false when the job-level source isn't synced yet. `llm_spend` carries the agent LLM token spend attributed to the PR by git branch, or null when no `$ai_generation` event matched.
*/
-export const EngineeringAnalyticsPrCostParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsPrCostParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -108,7 +108,7 @@ export const EngineeringAnalyticsPrCostParams = /* @__PURE__ */ zod.object({
),
})
-export const EngineeringAnalyticsPrCostQueryParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsPrCostQueryParams = () => zod.object({
pr_number: zod.number().describe('Pull request number to estimate cost for.'),
repo: zod.string().describe("'owner\/name' repository the pull request belongs to."),
source_id: zod
@@ -122,7 +122,7 @@ export const EngineeringAnalyticsPrCostQueryParams = /* @__PURE__ */ zod.object(
/**
* The timeline of a single pull request: header plus ordered events (opened, CI started/finished, merged or closed). Use this to answer 'where is this PR stuck and what happened to it'. This is a partial view: review and comment events are not yet available.
*/
-export const EngineeringAnalyticsPrLifecycleParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsPrLifecycleParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -130,7 +130,7 @@ export const EngineeringAnalyticsPrLifecycleParams = /* @__PURE__ */ zod.object(
),
})
-export const EngineeringAnalyticsPrLifecycleQueryParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsPrLifecycleQueryParams = () => zod.object({
pr_number: zod.number().describe('Pull request number to inspect.'),
repo: zod.string().describe("'owner\/name' repository the pull request belongs to."),
source_id: zod
@@ -144,7 +144,7 @@ export const EngineeringAnalyticsPrLifecycleQueryParams = /* @__PURE__ */ zod.ob
/**
* Open pull requests plus any merged or closed since date_from (default -30d), newest first, each with its head-SHA CI rollup. The list is capped; when more match, `truncated` is true and the ci_cards counts can exceed it. open_to_merge_seconds is coarse — it fuses draft and ready-for-review time; CI counts can lag until late completions settle.
*/
-export const EngineeringAnalyticsPullRequestsParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsPullRequestsParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -152,7 +152,7 @@ export const EngineeringAnalyticsPullRequestsParams = /* @__PURE__ */ zod.object
),
})
-export const EngineeringAnalyticsPullRequestsQueryParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsPullRequestsQueryParams = () => zod.object({
author: zod.string().optional().describe("Optional GitHub login to scope the list to one author's pull requests."),
date_from: zod.string().optional().describe("Window start: relative ('-30d', '-8w') or ISO8601. Defaults to -30d."),
repo: zod
@@ -172,7 +172,7 @@ export const EngineeringAnalyticsPullRequestsQueryParams = /* @__PURE__ */ zod.o
/**
* The thinned CI failure logs of one workflow run, grouped by failed job — the run-scoped twin of ci_failure_logs for surfaces that aren't PR-scoped (default-branch failures, the run page). logs_available is false when the run didn't fail or its logs aged out of the short Logs retention.
*/
-export const EngineeringAnalyticsRunFailureLogsParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsRunFailureLogsParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -180,7 +180,7 @@ export const EngineeringAnalyticsRunFailureLogsParams = /* @__PURE__ */ zod.obje
),
})
-export const EngineeringAnalyticsRunFailureLogsQueryParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsRunFailureLogsQueryParams = () => zod.object({
repo: zod
.string()
.optional()
@@ -199,7 +199,7 @@ export const EngineeringAnalyticsRunFailureLogsQueryParams = /* @__PURE__ */ zod
/**
* The team's selectable GitHub repositories, oldest source first — one entry per repository a source is configured to sync, so a source syncing several repositories appears once per repo. Populate a repo picker from this and pass a chosen entry's `id` back as `source_id` and its `repo` back as `repo` to the other endpoints. Includes repositories whose tables aren't fully synced yet.
*/
-export const EngineeringAnalyticsSourcesParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsSourcesParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -210,7 +210,7 @@ export const EngineeringAnalyticsSourcesParams = /* @__PURE__ */ zod.object({
/**
* Per-owning-team rollup of the CI test surfaces each team owns, over the same run evidence as flaky_tests and with the same meaning of flaky: flaky_test_count is owned tests one commit was seen both failing and passing in the window, regression_test_count is owned tests that failed with no such proof and still hit the blast-radius bar, plus failed/recovery/quarantined run counts. Each has an equal-length previous-window twin for honest deltas. Ownership is stamped on the spans at CI emission time from the repo's ownership map (the distributed owners.yaml files); unstamped spans aggregate under the literal team 'unowned', and a re-stamped test lands under its latest owner only. Each row also carries test_file_count (the daily owners.yaml census denominator, with a window-start twin) and merged_pr_count (merged PRs by the team's members, bots excluded); teams with census counts but no CI signal appear with zero signal counts and a null last_seen_at. Teams are organizational owners of code surfaces, never authors. Counts are absolute, never rates: CI emits every failure but omits ordinary passing spans, so there is no execution denominator. 'suspected_regression' means no recovery was recorded in this data, not that the test never flakes.
*/
-export const EngineeringAnalyticsTeamCiHealthParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsTeamCiHealthParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -218,7 +218,7 @@ export const EngineeringAnalyticsTeamCiHealthParams = /* @__PURE__ */ zod.object
),
})
-export const EngineeringAnalyticsTeamCiHealthQueryParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsTeamCiHealthQueryParams = () => zod.object({
date_from: zod
.string()
.optional()
@@ -250,7 +250,7 @@ export const EngineeringAnalyticsTeamCiHealthQueryParams = /* @__PURE__ */ zod.o
/**
* Per-workflow CI health over a window (default last 24 hours, maximum 366 days): run count, success rate, p50/p95 duration, last failure time, latest-run status, and a zero-filled run history bucketed by hour/day/week to fit the window. Success rate covers runs that succeeded or ended in a decisive failure. Skipped, cancelled, neutral, and action-required runs are excluded. p50/p95 are over successful runs only, so cancelled (superseded) and failed runs never bias the duration trend. Optionally scope to a single git branch via `branch`, or to attributed pull-request runs via `run_scope=pull_request`. Use this for 'is CI getting slower' and 'which workflow is the long pole'; compare two windows to get a trend.
*/
-export const EngineeringAnalyticsWorkflowHealthParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsWorkflowHealthParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -258,7 +258,7 @@ export const EngineeringAnalyticsWorkflowHealthParams = /* @__PURE__ */ zod.obje
),
})
-export const EngineeringAnalyticsWorkflowHealthQueryParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsWorkflowHealthQueryParams = () => zod.object({
branch: zod
.string()
.optional()
@@ -290,7 +290,7 @@ export const EngineeringAnalyticsWorkflowHealthQueryParams = /* @__PURE__ */ zod
/**
* Jobs of a single workflow run attempt, with per-job duration, runner tier, and estimated cost. Scoped to one run_attempt (the latest unless specified) so a re-run's attempts don't merge. Returns an empty list when the job-level source isn't synced yet.
*/
-export const EngineeringAnalyticsWorkflowJobsParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsWorkflowJobsParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -298,7 +298,7 @@ export const EngineeringAnalyticsWorkflowJobsParams = /* @__PURE__ */ zod.object
),
})
-export const EngineeringAnalyticsWorkflowJobsQueryParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsWorkflowJobsQueryParams = () => zod.object({
repo: zod
.string()
.optional()
@@ -323,7 +323,7 @@ export const EngineeringAnalyticsWorkflowJobsQueryParams = /* @__PURE__ */ zod.o
/**
* A workflow's estimated CI cost broken down by runner tier over a window (date_from default -30d), highest spend first. Optionally scope to a single git branch via `branch`. Returns an empty list when the job-level source isn't synced.
*/
-export const EngineeringAnalyticsWorkflowRunnerCostsParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsWorkflowRunnerCostsParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -331,7 +331,7 @@ export const EngineeringAnalyticsWorkflowRunnerCostsParams = /* @__PURE__ */ zod
),
})
-export const EngineeringAnalyticsWorkflowRunnerCostsQueryParams = /* @__PURE__ */ zod.object({
+export const EngineeringAnalyticsWorkflowRunnerCostsQueryParams = () => zod.object({
branch: zod
.string()
.optional()
diff --git a/services/mcp/src/generated/error_tracking/api.ts b/services/mcp/src/generated/error_tracking/api.ts
index 82acdf09fb81..8c7f671d08d2 100644
--- a/services/mcp/src/generated/error_tracking/api.ts
+++ b/services/mcp/src/generated/error_tracking/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const ErrorTrackingAssignmentRulesListParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingAssignmentRulesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,12 +16,12 @@ export const ErrorTrackingAssignmentRulesListParams = /* @__PURE__ */ zod.object
),
})
-export const ErrorTrackingAssignmentRulesListQueryParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingAssignmentRulesListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const ErrorTrackingAssignmentRulesCreateParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingAssignmentRulesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -63,7 +63,7 @@ export const errorTrackingAssignmentRulesCreateBodyFiltersOneValuesItemTwofiveEv
export const errorTrackingAssignmentRulesCreateBodyFiltersOneValuesItemTwofiveTypeDefault = `behavioral`
export const errorTrackingAssignmentRulesCreateBodyOrderKeyDefault = 0
-export const ErrorTrackingAssignmentRulesCreateBody = /* @__PURE__ */ zod.object({
+export const ErrorTrackingAssignmentRulesCreateBody = () => zod.object({
filters: zod
.object({
type: zod.enum(['AND', 'OR']),
@@ -1613,7 +1613,7 @@ export const ErrorTrackingAssignmentRulesCreateBody = /* @__PURE__ */ zod.object
),
})
-export const ErrorTrackingBypassRulesListParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingBypassRulesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1621,12 +1621,12 @@ export const ErrorTrackingBypassRulesListParams = /* @__PURE__ */ zod.object({
),
})
-export const ErrorTrackingBypassRulesListQueryParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingBypassRulesListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const ErrorTrackingBypassRulesCreateParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingBypassRulesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1667,7 +1667,7 @@ export const errorTrackingBypassRulesCreateBodyFiltersOneValuesItemTwofiveEventF
export const errorTrackingBypassRulesCreateBodyFiltersOneValuesItemTwofiveEventFiltersOneItemFiveTypeDefault = `hogql`
export const errorTrackingBypassRulesCreateBodyFiltersOneValuesItemTwofiveTypeDefault = `behavioral`
-export const ErrorTrackingBypassRulesCreateBody = /* @__PURE__ */ zod.object({
+export const ErrorTrackingBypassRulesCreateBody = () => zod.object({
filters: zod
.object({
type: zod.enum(['AND', 'OR']),
@@ -3200,7 +3200,7 @@ export const ErrorTrackingBypassRulesCreateBody = /* @__PURE__ */ zod.object({
),
})
-export const ErrorTrackingBypassRulesUpdateParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingBypassRulesUpdateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -3242,7 +3242,7 @@ export const errorTrackingBypassRulesUpdateBodyFiltersOneValuesItemTwofiveEventF
export const errorTrackingBypassRulesUpdateBodyFiltersOneValuesItemTwofiveEventFiltersOneItemFiveTypeDefault = `hogql`
export const errorTrackingBypassRulesUpdateBodyFiltersOneValuesItemTwofiveTypeDefault = `behavioral`
-export const ErrorTrackingBypassRulesUpdateBody = /* @__PURE__ */ zod.object({
+export const ErrorTrackingBypassRulesUpdateBody = () => zod.object({
filters: zod
.object({
type: zod.enum(['AND', 'OR']),
@@ -4776,7 +4776,7 @@ export const ErrorTrackingBypassRulesUpdateBody = /* @__PURE__ */ zod.object({
),
})
-export const ErrorTrackingExternalReferencesCreateParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingExternalReferencesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -4784,7 +4784,7 @@ export const ErrorTrackingExternalReferencesCreateParams = /* @__PURE__ */ zod.o
),
})
-export const ErrorTrackingExternalReferencesCreateBody = /* @__PURE__ */ zod
+export const ErrorTrackingExternalReferencesCreateBody = () => zod
.object({
integration_id: zod
.number()
@@ -4800,7 +4800,7 @@ export const ErrorTrackingExternalReferencesCreateBody = /* @__PURE__ */ zod
})
.describe('Payload for creating a new provider issue and linking it to an error tracking issue.')
-export const ErrorTrackingGroupingRulesListParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingGroupingRulesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -4808,7 +4808,7 @@ export const ErrorTrackingGroupingRulesListParams = /* @__PURE__ */ zod.object({
),
})
-export const ErrorTrackingGroupingRulesCreateParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingGroupingRulesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -4849,7 +4849,7 @@ export const errorTrackingGroupingRulesCreateBodyFiltersOneValuesItemTwofiveEven
export const errorTrackingGroupingRulesCreateBodyFiltersOneValuesItemTwofiveEventFiltersOneItemFiveTypeDefault = `hogql`
export const errorTrackingGroupingRulesCreateBodyFiltersOneValuesItemTwofiveTypeDefault = `behavioral`
-export const ErrorTrackingGroupingRulesCreateBody = /* @__PURE__ */ zod.object({
+export const ErrorTrackingGroupingRulesCreateBody = () => zod.object({
filters: zod
.object({
type: zod.enum(['AND', 'OR']),
@@ -6401,7 +6401,7 @@ export const ErrorTrackingGroupingRulesCreateBody = /* @__PURE__ */ zod.object({
.describe('Optional human-readable description of what this grouping rule is for.'),
})
-export const ErrorTrackingGroupingRulesUpdateParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingGroupingRulesUpdateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -6443,7 +6443,7 @@ export const errorTrackingGroupingRulesUpdateBodyFiltersOneValuesItemTwofiveEven
export const errorTrackingGroupingRulesUpdateBodyFiltersOneValuesItemTwofiveEventFiltersOneItemFiveTypeDefault = `hogql`
export const errorTrackingGroupingRulesUpdateBodyFiltersOneValuesItemTwofiveTypeDefault = `behavioral`
-export const ErrorTrackingGroupingRulesUpdateBody = /* @__PURE__ */ zod.object({
+export const ErrorTrackingGroupingRulesUpdateBody = () => zod.object({
filters: zod
.union([
zod.object({
@@ -7999,7 +7999,7 @@ export const ErrorTrackingGroupingRulesUpdateBody = /* @__PURE__ */ zod.object({
),
})
-export const ErrorTrackingIssuesPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingIssuesPartialUpdateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -8008,7 +8008,7 @@ export const ErrorTrackingIssuesPartialUpdateParams = /* @__PURE__ */ zod.object
),
})
-export const ErrorTrackingIssuesPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const ErrorTrackingIssuesPartialUpdateBody = () => zod.object({
status: zod
.enum(['active', 'resolved', 'suppressed'])
.describe('\* `active` - active\n\* `resolved` - resolved\n\* `suppressed` - suppressed')
@@ -8024,7 +8024,7 @@ export const ErrorTrackingIssuesPartialUpdateBody = /* @__PURE__ */ zod.object({
description: zod.string().nullish().describe('Optional issue description.'),
})
-export const ErrorTrackingIssuesAssignPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingIssuesAssignPartialUpdateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -8033,7 +8033,7 @@ export const ErrorTrackingIssuesAssignPartialUpdateParams = /* @__PURE__ */ zod.
),
})
-export const ErrorTrackingIssuesAssignPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const ErrorTrackingIssuesAssignPartialUpdateBody = () => zod.object({
assignee: zod
.union([
zod.object({
@@ -8049,7 +8049,7 @@ export const ErrorTrackingIssuesAssignPartialUpdateBody = /* @__PURE__ */ zod.ob
.describe('Assignment target. Set to null or omit to remove the current assignment.'),
})
-export const ErrorTrackingIssuesMergeCreateParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingIssuesMergeCreateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -8058,11 +8058,11 @@ export const ErrorTrackingIssuesMergeCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const ErrorTrackingIssuesMergeCreateBody = /* @__PURE__ */ zod.object({
+export const ErrorTrackingIssuesMergeCreateBody = () => zod.object({
ids: zod.array(zod.string()).describe('IDs of the issues to merge into the current issue.'),
})
-export const ErrorTrackingIssuesSplitCreateParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingIssuesSplitCreateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -8071,7 +8071,7 @@ export const ErrorTrackingIssuesSplitCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const ErrorTrackingIssuesSplitCreateBody = /* @__PURE__ */ zod.object({
+export const ErrorTrackingIssuesSplitCreateBody = () => zod.object({
fingerprints: zod
.array(
zod.object({
@@ -8094,7 +8094,7 @@ export const ErrorTrackingIssuesSplitCreateBody = /* @__PURE__ */ zod.object({
* Fetch one error tracking issue with impact counts, top in_app frame, latest release, and optional sparkline.
* @summary Get compact error tracking issue details
*/
-export const ErrorTrackingQueryIssueCreateParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingQueryIssueCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -8109,7 +8109,7 @@ export const errorTrackingQueryIssueCreateBodyVolumeResolutionMax = 200
export const errorTrackingQueryIssueCreateBodyIncludeSparklineDefault = false
-export const ErrorTrackingQueryIssueCreateBody = /* @__PURE__ */ zod.object({
+export const ErrorTrackingQueryIssueCreateBody = () => zod.object({
issueId: zod.string().describe('Error tracking issue ID.'),
dateRange: zod
.object({
@@ -8144,7 +8144,7 @@ export const ErrorTrackingQueryIssueCreateBody = /* @__PURE__ */ zod.object({
* Fetch sampled exception events, stack traces, browser/SDK context, URL, and $session_id values for one issue.
* @summary List sampled exception events for an error tracking issue
*/
-export const ErrorTrackingQueryIssueEventsCreateParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingQueryIssueEventsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -8166,7 +8166,7 @@ export const errorTrackingQueryIssueEventsCreateBodyOffsetMin = 0
export const errorTrackingQueryIssueEventsCreateBodyOnlyAppFramesDefault = true
-export const ErrorTrackingQueryIssueEventsCreateBody = /* @__PURE__ */ zod.object({
+export const ErrorTrackingQueryIssueEventsCreateBody = () => zod.object({
issueId: zod.string().describe('Error tracking issue ID.'),
dateRange: zod
.object({
@@ -8331,7 +8331,7 @@ export const ErrorTrackingQueryIssueEventsCreateBody = /* @__PURE__ */ zod.objec
* List error tracking issues with typed filters and compact aggregate counts.
* @summary List compact error tracking issues
*/
-export const ErrorTrackingQueryIssuesListCreateParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingQueryIssuesListCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -8365,7 +8365,7 @@ export const errorTrackingQueryIssuesListCreateBodyUrlMax = 1000
export const errorTrackingQueryIssuesListCreateBodyFilePathMax = 1000
-export const ErrorTrackingQueryIssuesListCreateBody = /* @__PURE__ */ zod.object({
+export const ErrorTrackingQueryIssuesListCreateBody = () => zod.object({
dateRange: zod
.object({
date_from: zod
@@ -8568,7 +8568,7 @@ export const ErrorTrackingQueryIssuesListCreateBody = /* @__PURE__ */ zod.object
.describe('Search stack-frame source\/file path text.'),
})
-export const ErrorTrackingRecommendationsListParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingRecommendationsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -8576,12 +8576,12 @@ export const ErrorTrackingRecommendationsListParams = /* @__PURE__ */ zod.object
),
})
-export const ErrorTrackingRecommendationsListQueryParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingRecommendationsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const ErrorTrackingSettingsRetrieveSettingsRetrieveParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingSettingsRetrieveSettingsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -8589,7 +8589,7 @@ export const ErrorTrackingSettingsRetrieveSettingsRetrieveParams = /* @__PURE__
),
})
-export const ErrorTrackingSettingsUpdateSettingsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingSettingsUpdateSettingsPartialUpdateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -8597,7 +8597,7 @@ export const ErrorTrackingSettingsUpdateSettingsPartialUpdateParams = /* @__PURE
),
})
-export const ErrorTrackingSettingsUpdateSettingsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const ErrorTrackingSettingsUpdateSettingsPartialUpdateBody = () => zod.object({
project_rate_limit_value: zod
.number()
.min(1)
@@ -8624,7 +8624,7 @@ export const ErrorTrackingSettingsUpdateSettingsPartialUpdateBody = /* @__PURE__
.describe('Bucket window over which the per-issue rate limit applies, in minutes.'),
})
-export const ErrorTrackingSeverityRulesListParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingSeverityRulesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -8632,7 +8632,7 @@ export const ErrorTrackingSeverityRulesListParams = /* @__PURE__ */ zod.object({
),
})
-export const ErrorTrackingSeverityRulesCreateParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingSeverityRulesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -8674,7 +8674,7 @@ export const errorTrackingSeverityRulesCreateBodyFiltersOneValuesItemTwofiveEven
export const errorTrackingSeverityRulesCreateBodyFiltersOneValuesItemTwofiveTypeDefault = `behavioral`
export const errorTrackingSeverityRulesCreateBodyOrderKeyDefault = 0
-export const ErrorTrackingSeverityRulesCreateBody = /* @__PURE__ */ zod.object({
+export const ErrorTrackingSeverityRulesCreateBody = () => zod.object({
filters: zod
.object({
type: zod.enum(['AND', 'OR']),
@@ -10215,7 +10215,7 @@ export const ErrorTrackingSeverityRulesCreateBody = /* @__PURE__ */ zod.object({
.describe('Evaluation priority. Lower values run first. Defaults to 0.'),
})
-export const ErrorTrackingSeverityRulesUpdateParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingSeverityRulesUpdateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -10257,7 +10257,7 @@ export const errorTrackingSeverityRulesUpdateBodyFiltersOneValuesItemTwofiveEven
export const errorTrackingSeverityRulesUpdateBodyFiltersOneValuesItemTwofiveEventFiltersOneItemFiveTypeDefault = `hogql`
export const errorTrackingSeverityRulesUpdateBodyFiltersOneValuesItemTwofiveTypeDefault = `behavioral`
-export const ErrorTrackingSeverityRulesUpdateBody = /* @__PURE__ */ zod.object({
+export const ErrorTrackingSeverityRulesUpdateBody = () => zod.object({
filters: zod
.object({
type: zod.enum(['AND', 'OR']),
@@ -11796,7 +11796,7 @@ export const ErrorTrackingSeverityRulesUpdateBody = /* @__PURE__ */ zod.object({
),
})
-export const ErrorTrackingSuppressionRulesListParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingSuppressionRulesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -11804,12 +11804,12 @@ export const ErrorTrackingSuppressionRulesListParams = /* @__PURE__ */ zod.objec
),
})
-export const ErrorTrackingSuppressionRulesListQueryParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingSuppressionRulesListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const ErrorTrackingSuppressionRulesCreateParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingSuppressionRulesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -11853,7 +11853,7 @@ export const errorTrackingSuppressionRulesCreateBodySamplingRateDefault = 1
export const errorTrackingSuppressionRulesCreateBodySamplingRateMin = 0
export const errorTrackingSuppressionRulesCreateBodySamplingRateMax = 1
-export const ErrorTrackingSuppressionRulesCreateBody = /* @__PURE__ */ zod.object({
+export const ErrorTrackingSuppressionRulesCreateBody = () => zod.object({
filters: zod
.object({
type: zod.enum(['AND', 'OR']),
@@ -13395,7 +13395,7 @@ export const ErrorTrackingSuppressionRulesCreateBody = /* @__PURE__ */ zod.objec
),
})
-export const ErrorTrackingSuppressionRulesUpdateParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingSuppressionRulesUpdateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -13439,7 +13439,7 @@ export const errorTrackingSuppressionRulesUpdateBodyFiltersOneValuesItemTwofiveT
export const errorTrackingSuppressionRulesUpdateBodySamplingRateMin = 0
export const errorTrackingSuppressionRulesUpdateBodySamplingRateMax = 1
-export const ErrorTrackingSuppressionRulesUpdateBody = /* @__PURE__ */ zod.object({
+export const ErrorTrackingSuppressionRulesUpdateBody = () => zod.object({
filters: zod
.object({
type: zod.enum(['AND', 'OR']),
@@ -14981,7 +14981,7 @@ export const ErrorTrackingSuppressionRulesUpdateBody = /* @__PURE__ */ zod.objec
),
})
-export const ErrorTrackingSymbolSetsListParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingSymbolSetsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -14991,7 +14991,7 @@ export const ErrorTrackingSymbolSetsListParams = /* @__PURE__ */ zod.object({
export const errorTrackingSymbolSetsListQueryStatusDefault = `all`
-export const ErrorTrackingSymbolSetsListQueryParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingSymbolSetsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
order_by: zod
@@ -15017,7 +15017,7 @@ export const ErrorTrackingSymbolSetsListQueryParams = /* @__PURE__ */ zod.object
),
})
-export const ErrorTrackingSymbolSetsRetrieveParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingSymbolSetsRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -15029,7 +15029,7 @@ export const ErrorTrackingSymbolSetsRetrieveParams = /* @__PURE__ */ zod.object(
/**
* Return a presigned URL for downloading the symbol set's source map.
*/
-export const ErrorTrackingSymbolSetsDownloadRetrieveParams = /* @__PURE__ */ zod.object({
+export const ErrorTrackingSymbolSetsDownloadRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
diff --git a/services/mcp/src/generated/error_tracking_alerts/api.ts b/services/mcp/src/generated/error_tracking_alerts/api.ts
index 466cfd29a04f..518f5175b2a3 100644
--- a/services/mcp/src/generated/error_tracking_alerts/api.ts
+++ b/services/mcp/src/generated/error_tracking_alerts/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const HogFunctionsListParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,7 +16,7 @@ export const HogFunctionsListParams = /* @__PURE__ */ zod.object({
),
})
-export const HogFunctionsListQueryParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsListQueryParams = () => zod.object({
created_at: zod.iso.datetime({ offset: true }).optional(),
created_by: zod.number().optional(),
enabled: zod.boolean().optional(),
@@ -27,7 +27,7 @@ export const HogFunctionsListQueryParams = /* @__PURE__ */ zod.object({
updated_at: zod.iso.datetime({ offset: true }).optional(),
})
-export const HogFunctionsCreateParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -53,7 +53,7 @@ export const hogFunctionsCreateBodyTemplateIdMax = 400
export const hogFunctionsCreateBodyExecutionOrderMin = 0
export const hogFunctionsCreateBodyExecutionOrderMax = 32767
-export const HogFunctionsCreateBody = /* @__PURE__ */ zod.object({
+export const HogFunctionsCreateBody = () => zod.object({
type: zod
.union([
zod
@@ -278,7 +278,7 @@ export const HogFunctionsCreateBody = /* @__PURE__ */ zod.object({
.describe('Execution priority for transformations. Lower values run first.'),
})
-export const HogFunctionsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog function.'),
project_id: zod
.string()
@@ -305,7 +305,7 @@ export const hogFunctionsPartialUpdateBodyTemplateIdMax = 400
export const hogFunctionsPartialUpdateBodyExecutionOrderMin = 0
export const hogFunctionsPartialUpdateBodyExecutionOrderMax = 32767
-export const HogFunctionsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const HogFunctionsPartialUpdateBody = () => zod.object({
type: zod
.union([
zod
@@ -539,7 +539,7 @@ export const HogFunctionsPartialUpdateBody = /* @__PURE__ */ zod.object({
/**
* Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
*/
-export const HogFunctionsDestroyParams = /* @__PURE__ */ zod.object({
+export const HogFunctionsDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog function.'),
project_id: zod
.string()
diff --git a/services/mcp/src/generated/experiments/api.ts b/services/mcp/src/generated/experiments/api.ts
index 7c24de2fce2f..4ae05e33850b 100644
--- a/services/mcp/src/generated/experiments/api.ts
+++ b/services/mcp/src/generated/experiments/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const ExperimentHoldoutsListParams = /* @__PURE__ */ zod.object({
+export const ExperimentHoldoutsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,12 +16,12 @@ export const ExperimentHoldoutsListParams = /* @__PURE__ */ zod.object({
),
})
-export const ExperimentHoldoutsListQueryParams = /* @__PURE__ */ zod.object({
+export const ExperimentHoldoutsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const ExperimentHoldoutsCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentHoldoutsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -33,7 +33,7 @@ export const experimentHoldoutsCreateBodyNameMax = 400
export const experimentHoldoutsCreateBodyDescriptionMax = 400
-export const ExperimentHoldoutsCreateBody = /* @__PURE__ */ zod
+export const ExperimentHoldoutsCreateBody = () => zod
.object({
name: zod
.string()
@@ -305,7 +305,7 @@ export const ExperimentHoldoutsCreateBody = /* @__PURE__ */ zod
})
.describe('A holdout group — a stable slice of users excluded from experiment exposure.')
-export const ExperimentHoldoutsRetrieveParams = /* @__PURE__ */ zod.object({
+export const ExperimentHoldoutsRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment holdout.'),
project_id: zod
.string()
@@ -314,7 +314,7 @@ export const ExperimentHoldoutsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const ExperimentHoldoutsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const ExperimentHoldoutsPartialUpdateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment holdout.'),
project_id: zod
.string()
@@ -327,7 +327,7 @@ export const experimentHoldoutsPartialUpdateBodyNameMax = 400
export const experimentHoldoutsPartialUpdateBodyDescriptionMax = 400
-export const ExperimentHoldoutsPartialUpdateBody = /* @__PURE__ */ zod
+export const ExperimentHoldoutsPartialUpdateBody = () => zod
.object({
name: zod
.string()
@@ -600,7 +600,7 @@ export const ExperimentHoldoutsPartialUpdateBody = /* @__PURE__ */ zod
})
.describe('A holdout group — a stable slice of users excluded from experiment exposure.')
-export const ExperimentHoldoutsDestroyParams = /* @__PURE__ */ zod.object({
+export const ExperimentHoldoutsDestroyParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment holdout.'),
project_id: zod
.string()
@@ -609,7 +609,7 @@ export const ExperimentHoldoutsDestroyParams = /* @__PURE__ */ zod.object({
),
})
-export const ExperimentSavedMetricsListParams = /* @__PURE__ */ zod.object({
+export const ExperimentSavedMetricsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -617,7 +617,7 @@ export const ExperimentSavedMetricsListParams = /* @__PURE__ */ zod.object({
),
})
-export const ExperimentSavedMetricsListQueryParams = /* @__PURE__ */ zod.object({
+export const ExperimentSavedMetricsListQueryParams = () => zod.object({
event: zod
.string()
.optional()
@@ -629,7 +629,7 @@ export const ExperimentSavedMetricsListQueryParams = /* @__PURE__ */ zod.object(
search: zod.string().optional().describe('A search term.'),
})
-export const ExperimentSavedMetricsCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentSavedMetricsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -641,7 +641,7 @@ export const experimentSavedMetricsCreateBodyNameMax = 400
export const experimentSavedMetricsCreateBodyDescriptionMax = 400
-export const ExperimentSavedMetricsCreateBody = /* @__PURE__ */ zod
+export const ExperimentSavedMetricsCreateBody = () => zod
.object({
name: zod
.string()
@@ -661,7 +661,7 @@ export const ExperimentSavedMetricsCreateBody = /* @__PURE__ */ zod
})
.describe('Mixin for serializers to add user access control fields')
-export const ExperimentSavedMetricsRetrieveParams = /* @__PURE__ */ zod.object({
+export const ExperimentSavedMetricsRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment saved metric.'),
project_id: zod
.string()
@@ -670,7 +670,7 @@ export const ExperimentSavedMetricsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const ExperimentSavedMetricsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const ExperimentSavedMetricsPartialUpdateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment saved metric.'),
project_id: zod
.string()
@@ -683,7 +683,7 @@ export const experimentSavedMetricsPartialUpdateBodyNameMax = 400
export const experimentSavedMetricsPartialUpdateBodyDescriptionMax = 400
-export const ExperimentSavedMetricsPartialUpdateBody = /* @__PURE__ */ zod
+export const ExperimentSavedMetricsPartialUpdateBody = () => zod
.object({
name: zod
.string()
@@ -705,7 +705,7 @@ export const ExperimentSavedMetricsPartialUpdateBody = /* @__PURE__ */ zod
})
.describe('Mixin for serializers to add user access control fields')
-export const ExperimentSavedMetricsDestroyParams = /* @__PURE__ */ zod.object({
+export const ExperimentSavedMetricsDestroyParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment saved metric.'),
project_id: zod
.string()
@@ -717,7 +717,7 @@ export const ExperimentSavedMetricsDestroyParams = /* @__PURE__ */ zod.object({
/**
* List experiments for the current project. Supports filtering by status and archival state.
*/
-export const ExperimentsListParams = /* @__PURE__ */ zod.object({
+export const ExperimentsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -725,7 +725,7 @@ export const ExperimentsListParams = /* @__PURE__ */ zod.object({
),
})
-export const ExperimentsListQueryParams = /* @__PURE__ */ zod.object({
+export const ExperimentsListQueryParams = () => zod.object({
archived: zod.boolean().optional().describe('Filter by archived state. Defaults to non-archived experiments only.'),
created_by_id: zod
.string()
@@ -766,7 +766,7 @@ export const ExperimentsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Create a new experiment in draft status with optional metrics.
*/
-export const ExperimentsCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -920,7 +920,7 @@ export const experimentsCreateBodyRepositoryMax = 255
export const experimentsCreateBodyUpdateFeatureFlagParamsDefault = false
-export const ExperimentsCreateBody = /* @__PURE__ */ zod
+export const ExperimentsCreateBody = () => zod
.object({
name: zod.string().max(experimentsCreateBodyNameMax).describe('Name of the experiment.'),
description: zod
@@ -6671,7 +6671,7 @@ export const ExperimentsCreateBody = /* @__PURE__ */ zod
/**
* Retrieve a single experiment by ID, including its current status, metrics, feature flag, and results metadata.
*/
-export const ExperimentsRetrieveParams = /* @__PURE__ */ zod.object({
+export const ExperimentsRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -6683,7 +6683,7 @@ export const ExperimentsRetrieveParams = /* @__PURE__ */ zod.object({
/**
* Update an experiment. Use this to modify experiment properties such as name, description, metrics, variants, and configuration. Metrics can be added, changed and removed at any time. Feature-flag config (variants, rollout, payloads) is sent via the feature_flag object.
*/
-export const ExperimentsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const ExperimentsPartialUpdateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -6834,7 +6834,7 @@ export const experimentsPartialUpdateBodyConclusionCommentMax = 4000
export const experimentsPartialUpdateBodyRepositoryMax = 255
-export const ExperimentsPartialUpdateBody = /* @__PURE__ */ zod
+export const ExperimentsPartialUpdateBody = () => zod
.object({
name: zod.string().max(experimentsPartialUpdateBodyNameMax).optional().describe('Name of the experiment.'),
description: zod
@@ -12593,7 +12593,7 @@ export const ExperimentsPartialUpdateBody = /* @__PURE__ */ zod
/**
* Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
*/
-export const ExperimentsDestroyParams = /* @__PURE__ */ zod.object({
+export const ExperimentsDestroyParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -12609,7 +12609,7 @@ export const ExperimentsDestroyParams = /* @__PURE__ */ zod.object({
* shared metrics, and its linked feature flag: who made each change, what changed
* (field-level before/after values), and when. Ordered newest first.
*/
-export const ExperimentsActivityRetrieveParams = /* @__PURE__ */ zod.object({
+export const ExperimentsActivityRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -12622,7 +12622,7 @@ export const experimentsActivityRetrieveQueryLimitDefault = 10
export const experimentsActivityRetrieveQueryPageDefault = 1
-export const ExperimentsActivityRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const ExperimentsActivityRetrieveQueryParams = () => zod.object({
limit: zod
.number()
.min(1)
@@ -12640,7 +12640,7 @@ export const ExperimentsActivityRetrieveQueryParams = /* @__PURE__ */ zod.object
* archive it. Returns 400 if the experiment is already archived or has not
* ended yet.
*/
-export const ExperimentsArchiveCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentsArchiveCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -12651,7 +12651,7 @@ export const ExperimentsArchiveCreateParams = /* @__PURE__ */ zod.object({
export const experimentsArchiveCreateBodyDisableFeatureFlagDefault = false
-export const ExperimentsArchiveCreateBody = /* @__PURE__ */ zod.object({
+export const ExperimentsArchiveCreateBody = () => zod.object({
disable_feature_flag: zod
.boolean()
.default(experimentsArchiveCreateBodyDisableFeatureFlagDefault)
@@ -12663,7 +12663,7 @@ export const ExperimentsArchiveCreateBody = /* @__PURE__ */ zod.object({
/**
* Copy an experiment into another project in the same organization as a new draft.
*/
-export const ExperimentsCopyToProjectCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentsCopyToProjectCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -12672,7 +12672,7 @@ export const ExperimentsCopyToProjectCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const ExperimentsCopyToProjectCreateBody = /* @__PURE__ */ zod.object({
+export const ExperimentsCopyToProjectCreateBody = () => zod.object({
target_team_id: zod.number().describe('The team ID to copy the experiment to.'),
feature_flag_key: zod.string().optional().describe('Optional feature flag key to use in the destination team.'),
name: zod.string().optional().describe('Optional name for the copied experiment.'),
@@ -12685,7 +12685,7 @@ export const ExperimentsCopyToProjectCreateBody = /* @__PURE__ */ zod.object({
* decorator on serializer methods and converts them into the same responses the viewset path
* produces (see decorators._result_to_response), so both paths share one contract.
*/
-export const ExperimentsDuplicateCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentsDuplicateCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -12832,7 +12832,7 @@ export const experimentsDuplicateCreateBodyRepositoryMax = 255
export const experimentsDuplicateCreateBodyUpdateFeatureFlagParamsDefault = false
-export const ExperimentsDuplicateCreateBody = /* @__PURE__ */ zod
+export const ExperimentsDuplicateCreateBody = () => zod
.object({
name: zod.string().max(experimentsDuplicateCreateBodyNameMax).describe('Name of the experiment.'),
description: zod
@@ -18510,7 +18510,7 @@ export const ExperimentsDuplicateCreateBody = /* @__PURE__ */ zod
*
* Returns 400 if the experiment is not running.
*/
-export const ExperimentsEndCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentsEndCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -18524,7 +18524,7 @@ export const experimentsEndCreateBodyConclusionCommentMax = 4000
export const experimentsEndCreateBodyOpenCleanupPrDefault = false
export const experimentsEndCreateBodyRepositoryMax = 255
-export const ExperimentsEndCreateBody = /* @__PURE__ */ zod.object({
+export const ExperimentsEndCreateBody = () => zod.object({
conclusion: zod
.union([
zod
@@ -18566,7 +18566,7 @@ export const ExperimentsEndCreateBody = /* @__PURE__ */ zod.object({
* returns that task's latest run status and the PR URL once one is opened. Poll
* until is_terminal is true. Returns 404 when no cleanup task was opened.
*/
-export const ExperimentsFlagCleanupTaskRetrieveParams = /* @__PURE__ */ zod.object({
+export const ExperimentsFlagCleanupTaskRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -18588,7 +18588,7 @@ export const ExperimentsFlagCleanupTaskRetrieveParams = /* @__PURE__ */ zod.obje
* the experiment is group-aggregated (group flags cannot be frozen with a
* person cohort), or the exposed set is too large to snapshot synchronously.
*/
-export const ExperimentsFreezeExposureCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentsFreezeExposureCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -18605,7 +18605,7 @@ export const ExperimentsFreezeExposureCreateParams = /* @__PURE__ */ zod.object(
* Returns 400 if the experiment has already been launched or if the feature flag
* configuration is invalid (e.g. fewer than 2 variants).
*/
-export const ExperimentsLaunchCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentsLaunchCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -18623,7 +18623,7 @@ export const ExperimentsLaunchCreateParams = /* @__PURE__ */ zod.object({
* results exist yet. Clients should poll `GET metrics_recalculation/{id}/` for results as the workflow
* progresses.
*/
-export const ExperimentsMetricsRecalculationCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentsMetricsRecalculationCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -18632,7 +18632,7 @@ export const ExperimentsMetricsRecalculationCreateParams = /* @__PURE__ */ zod.o
),
})
-export const ExperimentsMetricsRecalculationCreateBody = /* @__PURE__ */ zod
+export const ExperimentsMetricsRecalculationCreateBody = () => zod
.looseObject({})
.describe('Request body for triggering a metrics recalculation.')
@@ -18647,7 +18647,7 @@ export const experimentsMetricsRecalculationRetrievePathRecalculationIdRegExp =
'^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
)
-export const ExperimentsMetricsRecalculationRetrieveParams = /* @__PURE__ */ zod.object({
+export const ExperimentsMetricsRecalculationRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -18667,7 +18667,7 @@ export const ExperimentsMetricsRecalculationRetrieveParams = /* @__PURE__ */ zod
* decorator on serializer methods and converts them into the same responses the viewset path
* produces (see decorators._result_to_response), so both paths share one contract.
*/
-export const ExperimentsMetricsRecalculationLatestRetrieveParams = /* @__PURE__ */ zod.object({
+export const ExperimentsMetricsRecalculationLatestRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -18685,7 +18685,7 @@ export const ExperimentsMetricsRecalculationLatestRetrieveParams = /* @__PURE__
* $feature_flag_called is not fired).
* Returns 400 if the experiment is not running or is already paused.
*/
-export const ExperimentsPauseCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentsPauseCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -18706,7 +18706,7 @@ export const ExperimentsPauseCreateParams = /* @__PURE__ */ zod.object({
*
* Returns 400 if the experiment is already in draft state.
*/
-export const ExperimentsResetCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentsResetCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -18723,7 +18723,7 @@ export const ExperimentsResetCreateParams = /* @__PURE__ */ zod.object({
* before the pause, and exposure tracking resumes.
* Returns 400 if the experiment is not running or is not paused.
*/
-export const ExperimentsResumeCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentsResumeCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -18749,7 +18749,7 @@ export const ExperimentsResumeCreateParams = /* @__PURE__ */ zod.object({
* is what lets a card sit on one of the experiment's own metric events, which it names, so a
* reader is sent to the results rather than given a second answer.
*/
-export const ExperimentsSessionEventDeltasCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentsSessionEventDeltasCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -18780,7 +18780,7 @@ export const ExperimentsSessionEventDeltasCreateParams = /* @__PURE__ */ zod.obj
* Returns 400 if the experiment is in draft state, the variant_key is not found
* on the flag, or the experiment has no linked feature flag.
*/
-export const ExperimentsShipVariantCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentsShipVariantCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -18796,7 +18796,7 @@ export const experimentsShipVariantCreateBodyRepositoryMax = 255
export const experimentsShipVariantCreateBodyReleaseToEveryoneDefault = false
-export const ExperimentsShipVariantCreateBody = /* @__PURE__ */ zod.object({
+export const ExperimentsShipVariantCreateBody = () => zod.object({
conclusion: zod
.union([
zod
@@ -18844,7 +18844,7 @@ export const ExperimentsShipVariantCreateBody = /* @__PURE__ */ zod.object({
* decorator on serializer methods and converts them into the same responses the viewset path
* produces (see decorators._result_to_response), so both paths share one contract.
*/
-export const ExperimentsTimeseriesResultsRetrieveParams = /* @__PURE__ */ zod.object({
+export const ExperimentsTimeseriesResultsRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -18853,7 +18853,7 @@ export const ExperimentsTimeseriesResultsRetrieveParams = /* @__PURE__ */ zod.ob
),
})
-export const ExperimentsTimeseriesResultsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const ExperimentsTimeseriesResultsRetrieveQueryParams = () => zod.object({
fingerprint: zod
.string()
.describe(
@@ -18872,7 +18872,7 @@ export const ExperimentsTimeseriesResultsRetrieveQueryParams = /* @__PURE__ */ z
* Restores the experiment to the default list view. Returns 400 if the
* experiment is not currently archived.
*/
-export const ExperimentsUnarchiveCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentsUnarchiveCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -18891,7 +18891,7 @@ export const ExperimentsUnarchiveCreateParams = /* @__PURE__ */ zod.object({
*
* Returns 400 if the experiment is not running or its exposure is not frozen.
*/
-export const ExperimentsUnfreezeExposureCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentsUnfreezeExposureCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this experiment.'),
project_id: zod
.string()
@@ -18907,7 +18907,7 @@ export const ExperimentsUnfreezeExposureCreateParams = /* @__PURE__ */ zod.objec
* minimum detectable effect, and either a baseline value or raw baseline statistics. When
* `exposure_rate_per_day` is provided, the response also includes the estimated running time in days.
*/
-export const ExperimentsCalculateRunningTimeCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentsCalculateRunningTimeCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -18926,7 +18926,7 @@ export const experimentsCalculateRunningTimeCreateBodyBaselineStatsOneNumberOfSa
export const experimentsCalculateRunningTimeCreateBodyBaselineStatsOneSumSquaresDefault = 0
-export const ExperimentsCalculateRunningTimeCreateBody = /* @__PURE__ */ zod
+export const ExperimentsCalculateRunningTimeCreateBody = () => zod
.object({
metric_type: zod
.enum(['funnel', 'mean_count', 'mean_sum_or_avg', 'ratio', 'retention'])
@@ -19017,7 +19017,7 @@ export const ExperimentsCalculateRunningTimeCreateBody = /* @__PURE__ */ zod
* metric per selected template, each scoped to the prompt's $ai_prompt_name.
* Resulting experiment is in draft state.
*/
-export const ExperimentsCreateFromPromptCreateParams = /* @__PURE__ */ zod.object({
+export const ExperimentsCreateFromPromptCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -19030,7 +19030,7 @@ export const experimentsCreateFromPromptCreateBodyVersionsMax = 10
export const experimentsCreateFromPromptCreateBodyTemplatesMax = 3
-export const ExperimentsCreateFromPromptCreateBody = /* @__PURE__ */ zod.object({
+export const ExperimentsCreateFromPromptCreateBody = () => zod.object({
prompt_name: zod
.string()
.describe('The name of the LLM prompt to experiment on. Must already exist for this team.'),
@@ -19066,7 +19066,7 @@ export const ExperimentsCreateFromPromptCreateBody = /* @__PURE__ */ zod.object(
/**
* List the LLM metric templates that can be passed to `create_from_prompt`.
*/
-export const ExperimentsPromptTemplatesRetrieveParams = /* @__PURE__ */ zod.object({
+export const ExperimentsPromptTemplatesRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -19081,7 +19081,7 @@ export const ExperimentsPromptTemplatesRetrieveParams = /* @__PURE__ */ zod.obje
* decorator on serializer methods and converts them into the same responses the viewset path
* produces (see decorators._result_to_response), so both paths share one contract.
*/
-export const ExperimentsStatsRetrieveParams = /* @__PURE__ */ zod.object({
+export const ExperimentsStatsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
diff --git a/services/mcp/src/generated/feature_flags/api.ts b/services/mcp/src/generated/feature_flags/api.ts
index 1b66caa4f46b..202050e600fb 100644
--- a/services/mcp/src/generated/feature_flags/api.ts
+++ b/services/mcp/src/generated/feature_flags/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const FeatureFlagsCopyFlagsCreateParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsCopyFlagsCreateParams = () => zod.object({
organization_id: zod
.string()
.describe(
@@ -22,7 +22,7 @@ export const featureFlagsCopyFlagsCreateBodyCopyScheduleDefault = false
export const featureFlagsCopyFlagsCreateBodyDisableCopiedFlagDefault = false
export const featureFlagsCopyFlagsCreateBodyCopyDependenciesDefault = false
-export const FeatureFlagsCopyFlagsCreateBody = /* @__PURE__ */ zod.object({
+export const FeatureFlagsCopyFlagsCreateBody = () => zod.object({
feature_flag_key: zod.string().describe('Key of the feature flag to copy'),
from_project: zod.number().describe('Source project ID to copy the flag from'),
target_project_ids: zod
@@ -51,7 +51,7 @@ export const FeatureFlagsCopyFlagsCreateBody = /* @__PURE__ */ zod.object({
*
* If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
*/
-export const FeatureFlagsListParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -59,7 +59,7 @@ export const FeatureFlagsListParams = /* @__PURE__ */ zod.object({
),
})
-export const FeatureFlagsListQueryParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsListQueryParams = () => zod.object({
active: zod.enum(['STALE', 'false', 'true']).optional(),
archived: zod
.enum(['false', 'true'])
@@ -108,7 +108,7 @@ export const FeatureFlagsListQueryParams = /* @__PURE__ */ zod.object({
*
* If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
*/
-export const FeatureFlagsCreateParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -118,7 +118,7 @@ export const FeatureFlagsCreateParams = /* @__PURE__ */ zod.object({
export const featureFlagsCreateBodyFiltersOneEarlyExitDefault = false
-export const FeatureFlagsCreateBody = /* @__PURE__ */ zod.object({
+export const FeatureFlagsCreateBody = () => zod.object({
key: zod.string().optional().describe('Feature flag key.'),
name: zod
.string()
@@ -475,7 +475,7 @@ export const FeatureFlagsCreateBody = /* @__PURE__ */ zod.object({
*
* If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
*/
-export const FeatureFlagsRetrieveParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this feature flag.'),
project_id: zod
.string()
@@ -489,7 +489,7 @@ export const FeatureFlagsRetrieveParams = /* @__PURE__ */ zod.object({
*
* If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
*/
-export const FeatureFlagsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsPartialUpdateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this feature flag.'),
project_id: zod
.string()
@@ -500,7 +500,7 @@ export const FeatureFlagsPartialUpdateParams = /* @__PURE__ */ zod.object({
export const featureFlagsPartialUpdateBodyFiltersOneEarlyExitDefault = false
-export const FeatureFlagsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const FeatureFlagsPartialUpdateBody = () => zod.object({
key: zod.string().optional().describe('Feature flag key.'),
name: zod
.string()
@@ -855,7 +855,7 @@ export const FeatureFlagsPartialUpdateBody = /* @__PURE__ */ zod.object({
/**
* Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
*/
-export const FeatureFlagsDestroyParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsDestroyParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this feature flag.'),
project_id: zod
.string()
@@ -869,7 +869,7 @@ export const FeatureFlagsDestroyParams = /* @__PURE__ */ zod.object({
*
* If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
*/
-export const FeatureFlagsActivityRetrieveParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsActivityRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this feature flag.'),
project_id: zod
.string()
@@ -882,7 +882,7 @@ export const featureFlagsActivityRetrieveQueryLimitDefault = 10
export const featureFlagsActivityRetrieveQueryPageDefault = 1
-export const FeatureFlagsActivityRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsActivityRetrieveQueryParams = () => zod.object({
limit: zod
.number()
.min(1)
@@ -894,7 +894,7 @@ export const FeatureFlagsActivityRetrieveQueryParams = /* @__PURE__ */ zod.objec
/**
* Get other active flags that depend on this flag.
*/
-export const FeatureFlagsDependentFlagsListParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsDependentFlagsListParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this feature flag.'),
project_id: zod
.string()
@@ -908,7 +908,7 @@ export const FeatureFlagsDependentFlagsListParams = /* @__PURE__ */ zod.object({
*
* If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
*/
-export const FeatureFlagsStatusRetrieveParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsStatusRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this feature flag.'),
project_id: zod
.string()
@@ -924,7 +924,7 @@ export const FeatureFlagsStatusRetrieveParams = /* @__PURE__ */ zod.object({
* optionally at a historical timestamp. When a timestamp is provided, both the flag
* conditions and person properties are evaluated as they existed at that time.
*/
-export const FeatureFlagsTestEvaluationCreateParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsTestEvaluationCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this feature flag.'),
project_id: zod
.string()
@@ -933,7 +933,7 @@ export const FeatureFlagsTestEvaluationCreateParams = /* @__PURE__ */ zod.object
),
})
-export const FeatureFlagsTestEvaluationCreateBody = /* @__PURE__ */ zod.object({
+export const FeatureFlagsTestEvaluationCreateBody = () => zod.object({
distinct_id: zod
.string()
.optional()
@@ -963,7 +963,7 @@ export const FeatureFlagsTestEvaluationCreateBody = /* @__PURE__ */ zod.object({
* Uses bulk operations for efficiency: database updates are batched and cache
* invalidation happens once at the end rather than per-flag.
*/
-export const FeatureFlagsBulkDeleteCreateParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsBulkDeleteCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -971,7 +971,7 @@ export const FeatureFlagsBulkDeleteCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const FeatureFlagsBulkDeleteCreateBody = /* @__PURE__ */ zod.object({
+export const FeatureFlagsBulkDeleteCreateBody = () => zod.object({
filters: zod
.object({
active: zod
@@ -1033,7 +1033,7 @@ export const FeatureFlagsBulkDeleteCreateBody = /* @__PURE__ */ zod.object({
* Get feature flag keys by IDs.
* Accepts a list of feature flag IDs and returns a mapping of ID to key.
*/
-export const FeatureFlagsBulkKeysRetrieveParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsBulkKeysRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1041,7 +1041,7 @@ export const FeatureFlagsBulkKeysRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const FeatureFlagsBulkKeysRetrieveBody = /* @__PURE__ */ zod.object({
+export const FeatureFlagsBulkKeysRetrieveBody = () => zod.object({
ids: zod
.array(zod.unknown())
.optional()
@@ -1069,7 +1069,7 @@ export const FeatureFlagsBulkKeysRetrieveBody = /* @__PURE__ */ zod.object({
* - "remove": Remove specific tags from each object
* - "set": Replace all tags on each object with the provided list
*/
-export const FeatureFlagsBulkUpdateTagsCreateParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsBulkUpdateTagsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1079,7 +1079,7 @@ export const FeatureFlagsBulkUpdateTagsCreateParams = /* @__PURE__ */ zod.object
export const featureFlagsBulkUpdateTagsCreateBodyIdsMax = 500
-export const FeatureFlagsBulkUpdateTagsCreateBody = /* @__PURE__ */ zod.object({
+export const FeatureFlagsBulkUpdateTagsCreateBody = () => zod.object({
ids: zod
.array(zod.number())
.max(featureFlagsBulkUpdateTagsCreateBodyIdsMax)
@@ -1098,7 +1098,7 @@ export const FeatureFlagsBulkUpdateTagsCreateBody = /* @__PURE__ */ zod.object({
*
* If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
*/
-export const FeatureFlagsEvaluationReasonsRetrieveParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsEvaluationReasonsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1108,7 +1108,7 @@ export const FeatureFlagsEvaluationReasonsRetrieveParams = /* @__PURE__ */ zod.o
export const featureFlagsEvaluationReasonsRetrieveQueryGroupsDefault = `{}`
-export const FeatureFlagsEvaluationReasonsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsEvaluationReasonsRetrieveQueryParams = () => zod.object({
distinct_id: zod.string().min(1).describe('User distinct ID'),
flag_keys: zod
.array(zod.string())
@@ -1127,7 +1127,7 @@ export const FeatureFlagsEvaluationReasonsRetrieveQueryParams = /* @__PURE__ */
*
* If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
*/
-export const FeatureFlagsMyFlagsRetrieveParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsMyFlagsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1137,7 +1137,7 @@ export const FeatureFlagsMyFlagsRetrieveParams = /* @__PURE__ */ zod.object({
export const featureFlagsMyFlagsRetrieveQueryGroupsDefault = `{}`
-export const FeatureFlagsMyFlagsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsMyFlagsRetrieveQueryParams = () => zod.object({
flag_keys: zod
.array(zod.string())
.optional()
@@ -1155,7 +1155,7 @@ export const FeatureFlagsMyFlagsRetrieveQueryParams = /* @__PURE__ */ zod.object
*
* If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
*/
-export const FeatureFlagsUserBlastRadiusCreateParams = /* @__PURE__ */ zod.object({
+export const FeatureFlagsUserBlastRadiusCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1163,7 +1163,7 @@ export const FeatureFlagsUserBlastRadiusCreateParams = /* @__PURE__ */ zod.objec
),
})
-export const FeatureFlagsUserBlastRadiusCreateBody = /* @__PURE__ */ zod.object({
+export const FeatureFlagsUserBlastRadiusCreateBody = () => zod.object({
condition: zod.record(zod.string(), zod.unknown()).describe('The release condition to evaluate'),
group_type_index: zod
.number()
@@ -1174,7 +1174,7 @@ export const FeatureFlagsUserBlastRadiusCreateBody = /* @__PURE__ */ zod.object(
/**
* Create, read, update and delete scheduled changes.
*/
-export const ScheduledChangesListParams = /* @__PURE__ */ zod.object({
+export const ScheduledChangesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1182,7 +1182,7 @@ export const ScheduledChangesListParams = /* @__PURE__ */ zod.object({
),
})
-export const ScheduledChangesListQueryParams = /* @__PURE__ */ zod.object({
+export const ScheduledChangesListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
model_name: zod
.string()
@@ -1195,7 +1195,7 @@ export const ScheduledChangesListQueryParams = /* @__PURE__ */ zod.object({
/**
* Create, read, update and delete scheduled changes.
*/
-export const ScheduledChangesCreateParams = /* @__PURE__ */ zod.object({
+export const ScheduledChangesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1208,7 +1208,7 @@ export const scheduledChangesCreateBodyRecordIdMax = 200
export const scheduledChangesCreateBodyIsRecurringDefault = false
export const scheduledChangesCreateBodyCronExpressionMax = 100
-export const ScheduledChangesCreateBody = /* @__PURE__ */ zod.object({
+export const ScheduledChangesCreateBody = () => zod.object({
record_id: zod
.string()
.max(scheduledChangesCreateBodyRecordIdMax)
@@ -1252,7 +1252,7 @@ export const ScheduledChangesCreateBody = /* @__PURE__ */ zod.object({
/**
* Create, read, update and delete scheduled changes.
*/
-export const ScheduledChangesRetrieveParams = /* @__PURE__ */ zod.object({
+export const ScheduledChangesRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this scheduled change.'),
project_id: zod
.string()
@@ -1264,7 +1264,7 @@ export const ScheduledChangesRetrieveParams = /* @__PURE__ */ zod.object({
/**
* Create, read, update and delete scheduled changes.
*/
-export const ScheduledChangesPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const ScheduledChangesPartialUpdateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this scheduled change.'),
project_id: zod
.string()
@@ -1277,7 +1277,7 @@ export const scheduledChangesPartialUpdateBodyRecordIdMax = 200
export const scheduledChangesPartialUpdateBodyCronExpressionMax = 100
-export const ScheduledChangesPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const ScheduledChangesPartialUpdateBody = () => zod.object({
record_id: zod
.string()
.max(scheduledChangesPartialUpdateBodyRecordIdMax)
@@ -1325,7 +1325,7 @@ export const ScheduledChangesPartialUpdateBody = /* @__PURE__ */ zod.object({
/**
* Create, read, update and delete scheduled changes.
*/
-export const ScheduledChangesDestroyParams = /* @__PURE__ */ zod.object({
+export const ScheduledChangesDestroyParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this scheduled change.'),
project_id: zod
.string()
diff --git a/services/mcp/src/generated/field_notes/api.ts b/services/mcp/src/generated/field_notes/api.ts
index 4a40126cbcf9..0712c49de390 100644
--- a/services/mcp/src/generated/field_notes/api.ts
+++ b/services/mcp/src/generated/field_notes/api.ts
@@ -12,7 +12,7 @@ import * as zod from 'zod'
* Create, read, update, and resolve toolbar field notes — UI feedback a user
* points at on their own site, surfaced to coding agents over MCP.
*/
-export const FieldNotesListParams = /* @__PURE__ */ zod.object({
+export const FieldNotesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -20,7 +20,7 @@ export const FieldNotesListParams = /* @__PURE__ */ zod.object({
),
})
-export const FieldNotesListQueryParams = /* @__PURE__ */ zod.object({
+export const FieldNotesListQueryParams = () => zod.object({
field_note_status: zod
.enum(['acknowledged', 'dismissed', 'pending', 'resolved'])
.optional()
@@ -34,7 +34,7 @@ export const FieldNotesListQueryParams = /* @__PURE__ */ zod.object({
* Create, read, update, and resolve toolbar field notes — UI feedback a user
* points at on their own site, surfaced to coding agents over MCP.
*/
-export const FieldNotesRetrieveParams = /* @__PURE__ */ zod.object({
+export const FieldNotesRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this field note.'),
project_id: zod
.string()
@@ -47,7 +47,7 @@ export const FieldNotesRetrieveParams = /* @__PURE__ */ zod.object({
* Create, read, update, and resolve toolbar field notes — UI feedback a user
* points at on their own site, surfaced to coding agents over MCP.
*/
-export const FieldNotesPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const FieldNotesPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this field note.'),
project_id: zod
.string()
@@ -72,7 +72,7 @@ export const fieldNotesPartialUpdateBodyElementChainMax = 20000
export const fieldNotesPartialUpdateBodyScreenshotUrlMax = 2048
-export const FieldNotesPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const FieldNotesPartialUpdateBody = () => zod.object({
comment: zod
.string()
.max(fieldNotesPartialUpdateBodyCommentMax)
diff --git a/services/mcp/src/generated/health_issues/api.ts b/services/mcp/src/generated/health_issues/api.ts
index 53c4cbff10cc..882b4bee2dd9 100644
--- a/services/mcp/src/generated/health_issues/api.ts
+++ b/services/mcp/src/generated/health_issues/api.ts
@@ -12,7 +12,7 @@ import * as zod from 'zod'
* Lists health issues detected across all of this project's PostHog health checks (outdated SDKs, data warehouse sync failures, missing web analytics events, ingestion warnings, and more). Filter by status, severity, kind, or dismissed state.
* @summary List health issues
*/
-export const HealthIssuesListParams = /* @__PURE__ */ zod.object({
+export const HealthIssuesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -20,7 +20,7 @@ export const HealthIssuesListParams = /* @__PURE__ */ zod.object({
),
})
-export const HealthIssuesListQueryParams = /* @__PURE__ */ zod.object({
+export const HealthIssuesListQueryParams = () => zod.object({
dismissed: zod
.boolean()
.optional()
@@ -39,7 +39,7 @@ export const HealthIssuesListQueryParams = /* @__PURE__ */ zod.object({
* Fetches a single health issue, enriched with the owning check's rendered explanation: a title, a one-line summary of what's wrong, a deep link to the relevant page, and remediation guidance for how to fix it.
* @summary Get a health issue
*/
-export const HealthIssuesRetrieveParams = /* @__PURE__ */ zod.object({
+export const HealthIssuesRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this health issue.'),
project_id: zod
.string()
@@ -52,7 +52,7 @@ export const HealthIssuesRetrieveParams = /* @__PURE__ */ zod.object({
* Returns aggregated counts of active, non-dismissed health issues for the project, split into `unsnoozed` and `snoozed` groups and broken down by severity and by kind within each. Use for a quick overview of overall project health before drilling in with the list endpoint.
* @summary Summarize active health issues
*/
-export const HealthIssuesSummaryRetrieveParams = /* @__PURE__ */ zod.object({
+export const HealthIssuesSummaryRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
diff --git a/services/mcp/src/generated/integrations/api.ts b/services/mcp/src/generated/integrations/api.ts
index 48021f5f43ac..1a62f4f3e0d3 100644
--- a/services/mcp/src/generated/integrations/api.ts
+++ b/services/mcp/src/generated/integrations/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const IntegrationsListParams = /* @__PURE__ */ zod.object({
+export const IntegrationsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,7 +16,7 @@ export const IntegrationsListParams = /* @__PURE__ */ zod.object({
),
})
-export const IntegrationsListQueryParams = /* @__PURE__ */ zod.object({
+export const IntegrationsListQueryParams = () => zod.object({
kind: zod
.enum([
'anthropic',
@@ -75,7 +75,7 @@ export const IntegrationsListQueryParams = /* @__PURE__ */ zod.object({
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const IntegrationsRetrieveParams = /* @__PURE__ */ zod.object({
+export const IntegrationsRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this integration.'),
project_id: zod
.string()
@@ -84,7 +84,7 @@ export const IntegrationsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const IntegrationsDestroyParams = /* @__PURE__ */ zod.object({
+export const IntegrationsDestroyParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this integration.'),
project_id: zod
.string()
@@ -93,7 +93,7 @@ export const IntegrationsDestroyParams = /* @__PURE__ */ zod.object({
),
})
-export const IntegrationsChannelsRetrieveParams = /* @__PURE__ */ zod.object({
+export const IntegrationsChannelsRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this integration.'),
project_id: zod
.string()
@@ -110,7 +110,7 @@ export const integrationsChannelsRetrieveQueryOffsetMin = 0
export const integrationsChannelsRetrieveQuerySearchDefault = ``
-export const IntegrationsChannelsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const IntegrationsChannelsRetrieveQueryParams = () => zod.object({
limit: zod
.number()
.min(1)
@@ -128,7 +128,7 @@ export const IntegrationsChannelsRetrieveQueryParams = /* @__PURE__ */ zod.objec
.describe('Optional case-insensitive channel name or ID search query.'),
})
-export const IntegrationsGithubReposRetrieveParams = /* @__PURE__ */ zod.object({
+export const IntegrationsGithubReposRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this integration.'),
project_id: zod
.string()
@@ -145,7 +145,7 @@ export const integrationsGithubReposRetrieveQueryOffsetMin = 0
export const integrationsGithubReposRetrieveQuerySearchDefault = ``
-export const IntegrationsGithubReposRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const IntegrationsGithubReposRetrieveQueryParams = () => zod.object({
limit: zod
.number()
.min(1)
@@ -163,7 +163,7 @@ export const IntegrationsGithubReposRetrieveQueryParams = /* @__PURE__ */ zod.ob
.describe('Optional case-insensitive repository name search query.'),
})
-export const IntegrationsJiraProjectsRetrieveParams = /* @__PURE__ */ zod.object({
+export const IntegrationsJiraProjectsRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this integration.'),
project_id: zod
.string()
@@ -172,7 +172,7 @@ export const IntegrationsJiraProjectsRetrieveParams = /* @__PURE__ */ zod.object
),
})
-export const IntegrationsLinearTeamsRetrieveParams = /* @__PURE__ */ zod.object({
+export const IntegrationsLinearTeamsRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this integration.'),
project_id: zod
.string()
@@ -181,7 +181,7 @@ export const IntegrationsLinearTeamsRetrieveParams = /* @__PURE__ */ zod.object(
),
})
-export const IntegrationsUsersRetrieveParams = /* @__PURE__ */ zod.object({
+export const IntegrationsUsersRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this integration.'),
project_id: zod
.string()
@@ -200,7 +200,7 @@ export const integrationsUsersRetrieveQueryOffsetMin = 0
export const integrationsUsersRetrieveQuerySearchDefault = ``
export const integrationsUsersRetrieveQueryUserIdDefault = ``
-export const IntegrationsUsersRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const IntegrationsUsersRetrieveQueryParams = () => zod.object({
force_refresh: zod
.boolean()
.default(integrationsUsersRetrieveQueryForceRefreshDefault)
@@ -234,7 +234,7 @@ export const IntegrationsUsersRetrieveQueryParams = /* @__PURE__ */ zod.object({
* Replay an API request against the connected PostHog project. The server injects the connection's token; the response is passed through.
* @summary Forward a request through a PostHog connection
*/
-export const PosthogConnectionsForwardCreateParams = /* @__PURE__ */ zod.object({
+export const PosthogConnectionsForwardCreateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -243,7 +243,7 @@ export const PosthogConnectionsForwardCreateParams = /* @__PURE__ */ zod.object(
),
})
-export const PosthogConnectionsForwardCreateBody = /* @__PURE__ */ zod.object({
+export const PosthogConnectionsForwardCreateBody = () => zod.object({
method: zod
.enum(['GET', 'POST', 'PUT', 'PATCH', 'DELETE'])
.describe('\* `GET` - GET\n\* `POST` - POST\n\* `PUT` - PUT\n\* `PATCH` - PATCH\n\* `DELETE` - DELETE')
diff --git a/services/mcp/src/generated/logs/api.ts b/services/mcp/src/generated/logs/api.ts
index 6cde3fc2bfa7..524f97b7da97 100644
--- a/services/mcp/src/generated/logs/api.ts
+++ b/services/mcp/src/generated/logs/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const LogsAlertsListParams = /* @__PURE__ */ zod.object({
+export const LogsAlertsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,13 +16,13 @@ export const LogsAlertsListParams = /* @__PURE__ */ zod.object({
),
})
-export const LogsAlertsListQueryParams = /* @__PURE__ */ zod.object({
+export const LogsAlertsListQueryParams = () => zod.object({
created_by: zod.string().optional().describe('Only return log alerts created by the user with this UUID.'),
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const LogsAlertsCreateParams = /* @__PURE__ */ zod.object({
+export const LogsAlertsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -79,7 +79,7 @@ export const logsAlertsCreateBodyDatapointsToAlarmMax = 10
export const logsAlertsCreateBodyCooldownMinutesDefault = 0
export const logsAlertsCreateBodyCooldownMinutesMin = 0
-export const LogsAlertsCreateBody = /* @__PURE__ */ zod.object({
+export const LogsAlertsCreateBody = () => zod.object({
name: zod
.string()
.max(logsAlertsCreateBodyNameMax)
@@ -1804,7 +1804,7 @@ export const LogsAlertsCreateBody = /* @__PURE__ */ zod.object({
.describe('ISO 8601 timestamp until which the alert is snoozed. Set to null to unsnooze.'),
})
-export const LogsAlertsRetrieveParams = /* @__PURE__ */ zod.object({
+export const LogsAlertsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this logs alert configuration.'),
project_id: zod
.string()
@@ -1813,7 +1813,7 @@ export const LogsAlertsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const LogsAlertsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const LogsAlertsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this logs alert configuration.'),
project_id: zod
.string()
@@ -1864,7 +1864,7 @@ export const logsAlertsPartialUpdateBodyDatapointsToAlarmMax = 10
export const logsAlertsPartialUpdateBodyCooldownMinutesMin = 0
-export const LogsAlertsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const LogsAlertsPartialUpdateBody = () => zod.object({
name: zod
.string()
.max(logsAlertsPartialUpdateBodyNameMax)
@@ -3589,7 +3589,7 @@ export const LogsAlertsPartialUpdateBody = /* @__PURE__ */ zod.object({
.describe('ISO 8601 timestamp until which the alert is snoozed. Set to null to unsnooze.'),
})
-export const LogsAlertsDestroyParams = /* @__PURE__ */ zod.object({
+export const LogsAlertsDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this logs alert configuration.'),
project_id: zod
.string()
@@ -3601,7 +3601,7 @@ export const LogsAlertsDestroyParams = /* @__PURE__ */ zod.object({
/**
* Create a notification destination for this alert. One HogFunction is created per alert event kind (firing, resolved, ...) atomically.
*/
-export const LogsAlertsDestinationsCreateParams = /* @__PURE__ */ zod.object({
+export const LogsAlertsDestinationsCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this logs alert configuration.'),
project_id: zod
.string()
@@ -3610,7 +3610,7 @@ export const LogsAlertsDestinationsCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const LogsAlertsDestinationsCreateBody = /* @__PURE__ */ zod.object({
+export const LogsAlertsDestinationsCreateBody = () => zod.object({
type: zod
.enum(['slack', 'webhook', 'teams'])
.describe('\* `slack` - slack\n\* `webhook` - webhook\n\* `teams` - teams')
@@ -3627,7 +3627,7 @@ export const LogsAlertsDestinationsCreateBody = /* @__PURE__ */ zod.object({
/**
* Delete a notification destination by deleting its HogFunction group atomically.
*/
-export const LogsAlertsDestinationsDeleteCreateParams = /* @__PURE__ */ zod.object({
+export const LogsAlertsDestinationsDeleteCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this logs alert configuration.'),
project_id: zod
.string()
@@ -3636,7 +3636,7 @@ export const LogsAlertsDestinationsDeleteCreateParams = /* @__PURE__ */ zod.obje
),
})
-export const LogsAlertsDestinationsDeleteCreateBody = /* @__PURE__ */ zod.object({
+export const LogsAlertsDestinationsDeleteCreateBody = () => zod.object({
hog_function_ids: zod
.array(zod.string())
.min(1)
@@ -3646,7 +3646,7 @@ export const LogsAlertsDestinationsDeleteCreateBody = /* @__PURE__ */ zod.object
/**
* Paginated event history for this alert, newest first. Returns state transitions, errored checks, and user-initiated control-plane rows (reset, enable/disable, snooze/unsnooze, threshold change) — quiet no-op check rows (where state didn't change and there was no error) are filtered out since only the last 10 are kept and they carry no forensic value. Optional `?kind=...` narrows to a single kind.
*/
-export const LogsAlertsEventsListParams = /* @__PURE__ */ zod.object({
+export const LogsAlertsEventsListParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this logs alert configuration.'),
project_id: zod
.string()
@@ -3655,7 +3655,7 @@ export const LogsAlertsEventsListParams = /* @__PURE__ */ zod.object({
),
})
-export const LogsAlertsEventsListQueryParams = /* @__PURE__ */ zod.object({
+export const LogsAlertsEventsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
@@ -3663,7 +3663,7 @@ export const LogsAlertsEventsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Simulate a logs alert on historical data using the full state machine. Read-only — no alert check records are created.
*/
-export const LogsAlertsSimulateCreateParams = /* @__PURE__ */ zod.object({
+export const LogsAlertsSimulateCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -3717,7 +3717,7 @@ export const logsAlertsSimulateCreateBodyDatapointsToAlarmMax = 10
export const logsAlertsSimulateCreateBodyCooldownMinutesDefault = 0
export const logsAlertsSimulateCreateBodyCooldownMinutesMin = 0
-export const LogsAlertsSimulateCreateBody = /* @__PURE__ */ zod.object({
+export const LogsAlertsSimulateCreateBody = () => zod.object({
filters: zod
.object({
filterGroup: zod
@@ -5402,7 +5402,7 @@ export const LogsAlertsSimulateCreateBody = /* @__PURE__ */ zod.object({
* Runs anomaly detection on demand over one service's log volume for the given window. Learns per severity baselines from up to 6 weeks of history and returns per bucket expected bands plus any spike, drop, or silence issues. Synchronous and read only.
* @summary Scan a service's logs for volume anomalies
*/
-export const LogsAnomaliesScanCreateParams = /* @__PURE__ */ zod.object({
+export const LogsAnomaliesScanCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -5410,7 +5410,7 @@ export const LogsAnomaliesScanCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const LogsAnomaliesScanCreateBody = /* @__PURE__ */ zod.object({
+export const LogsAnomaliesScanCreateBody = () => zod.object({
serviceName: zod
.string()
.describe(
@@ -5430,7 +5430,7 @@ export const LogsAnomaliesScanCreateBody = /* @__PURE__ */ zod.object({
.describe('Evaluation window to scan for anomalies. May span at most 7 days.'),
})
-export const LogsAttributesRetrieveParams = /* @__PURE__ */ zod.object({
+export const LogsAttributesRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -5446,7 +5446,7 @@ export const logsAttributesRetrieveQueryOffsetMin = 0
export const logsAttributesRetrieveQuerySearchValuesDefault = false
export const logsAttributesRetrieveQueryServiceNamesDefault = []
-export const LogsAttributesRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const LogsAttributesRetrieveQueryParams = () => zod.object({
attribute_type: zod
.enum(['log', 'resource'])
.optional()
@@ -5544,7 +5544,7 @@ export const LogsAttributesRetrieveQueryParams = /* @__PURE__ */ zod.object({
.describe('Filter attributes to those appearing in logs from these services.'),
})
-export const LogsCountCreateParams = /* @__PURE__ */ zod.object({
+export const LogsCountCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -5552,7 +5552,7 @@ export const LogsCountCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const LogsCountCreateBody = /* @__PURE__ */ zod.object({
+export const LogsCountCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
@@ -5638,7 +5638,7 @@ export const LogsCountCreateBody = /* @__PURE__ */ zod.object({
.describe('The count query to execute.'),
})
-export const LogsCountRangesCreateParams = /* @__PURE__ */ zod.object({
+export const LogsCountRangesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -5649,7 +5649,7 @@ export const LogsCountRangesCreateParams = /* @__PURE__ */ zod.object({
export const logsCountRangesCreateBodyQueryOneTargetBucketsDefault = 10
export const logsCountRangesCreateBodyQueryOneTargetBucketsMax = 100
-export const LogsCountRangesCreateBody = /* @__PURE__ */ zod.object({
+export const LogsCountRangesCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
@@ -5751,7 +5751,7 @@ export const LogsCountRangesCreateBody = /* @__PURE__ */ zod.object({
.describe('The bucketed-count query to execute.'),
})
-export const LogsFacetValuesCreateParams = /* @__PURE__ */ zod.object({
+export const LogsFacetValuesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -5759,7 +5759,7 @@ export const LogsFacetValuesCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const LogsFacetValuesCreateBody = /* @__PURE__ */ zod.object({
+export const LogsFacetValuesCreateBody = () => zod.object({
query: zod
.object({
facetField: zod
@@ -5883,7 +5883,7 @@ export const LogsFacetValuesCreateBody = /* @__PURE__ */ zod.object({
.describe('The facet values query to execute.'),
})
-export const LogsPatternsCreateParams = /* @__PURE__ */ zod.object({
+export const LogsPatternsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -5891,7 +5891,7 @@ export const LogsPatternsCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const LogsPatternsCreateBody = /* @__PURE__ */ zod.object({
+export const LogsPatternsCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
@@ -5977,7 +5977,7 @@ export const LogsPatternsCreateBody = /* @__PURE__ */ zod.object({
.describe('The patterns query to execute.'),
})
-export const LogsPatternsDiffCreateParams = /* @__PURE__ */ zod.object({
+export const LogsPatternsDiffCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -5985,7 +5985,7 @@ export const LogsPatternsDiffCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const LogsPatternsDiffCreateBody = /* @__PURE__ */ zod.object({
+export const LogsPatternsDiffCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
@@ -6090,7 +6090,7 @@ export const LogsPatternsDiffCreateBody = /* @__PURE__ */ zod.object({
),
})
-export const LogsQueryCreateParams = /* @__PURE__ */ zod.object({
+export const LogsQueryCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -6105,7 +6105,7 @@ export const logsQueryCreateBodyQueryOneLimitDefault = 100
export const logsQueryCreateBodyQueryOneExcludeAttributesDefault = false
export const logsQueryCreateBodyQueryOneCustomColumnsDefault = []
-export const LogsQueryCreateBody = /* @__PURE__ */ zod.object({
+export const LogsQueryCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
@@ -6219,7 +6219,7 @@ export const LogsQueryCreateBody = /* @__PURE__ */ zod.object({
.describe('The logs query to execute.'),
})
-export const LogsServicesCreateParams = /* @__PURE__ */ zod.object({
+export const LogsServicesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -6229,7 +6229,7 @@ export const LogsServicesCreateParams = /* @__PURE__ */ zod.object({
export const logsServicesCreateBodyQueryOneServiceNameSearchMax = 200
-export const LogsServicesCreateBody = /* @__PURE__ */ zod.object({
+export const LogsServicesCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
@@ -6325,7 +6325,7 @@ export const LogsServicesCreateBody = /* @__PURE__ */ zod.object({
.describe('The services aggregation query to execute.'),
})
-export const LogsSparklineCreateParams = /* @__PURE__ */ zod.object({
+export const LogsSparklineCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -6337,7 +6337,7 @@ export const logsSparklineCreateBodyQueryOneSeverityLevelsDefault = []
export const logsSparklineCreateBodyQueryOneServiceNamesDefault = []
export const logsSparklineCreateBodyQueryOneFilterGroupDefault = []
-export const LogsSparklineCreateBody = /* @__PURE__ */ zod.object({
+export const LogsSparklineCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
@@ -6446,7 +6446,7 @@ export const LogsSparklineCreateBody = /* @__PURE__ */ zod.object({
.describe('The sparkline query to execute.'),
})
-export const LogsValuesRetrieveParams = /* @__PURE__ */ zod.object({
+export const LogsValuesRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -6457,7 +6457,7 @@ export const LogsValuesRetrieveParams = /* @__PURE__ */ zod.object({
export const logsValuesRetrieveQueryFilterGroupDefault = []
export const logsValuesRetrieveQueryServiceNamesDefault = []
-export const LogsValuesRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const LogsValuesRetrieveQueryParams = () => zod.object({
attribute_type: zod
.enum(['log', 'resource'])
.optional()
diff --git a/services/mcp/src/generated/managed_migrations/api.ts b/services/mcp/src/generated/managed_migrations/api.ts
index 4724f15ccb3e..ca5d3431f730 100644
--- a/services/mcp/src/generated/managed_migrations/api.ts
+++ b/services/mcp/src/generated/managed_migrations/api.ts
@@ -11,7 +11,7 @@ import * as zod from 'zod'
/**
* List batch import (managed migration) jobs across all teams. PostHog staff only.
*/
-export const ManagedMigrationsSupportListQueryParams = /* @__PURE__ */ zod.object({
+export const ManagedMigrationsSupportListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
ordering: zod.string().optional().describe('Which field to use when ordering the results.'),
@@ -26,6 +26,6 @@ export const ManagedMigrationsSupportListQueryParams = /* @__PURE__ */ zod.objec
/**
* Get one batch import job with its raw worker state and import config. PostHog staff only.
*/
-export const ManagedMigrationsSupportRetrieveParams = /* @__PURE__ */ zod.object({
+export const ManagedMigrationsSupportRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this batch import.'),
})
diff --git a/services/mcp/src/generated/marketing_analytics/api.ts b/services/mcp/src/generated/marketing_analytics/api.ts
index 2694693290de..ab070b36b1f3 100644
--- a/services/mcp/src/generated/marketing_analytics/api.ts
+++ b/services/mcp/src/generated/marketing_analytics/api.ts
@@ -12,7 +12,7 @@ import * as zod from 'zod'
* Read the configured conversion goals for the current project — each with its kind, target, last-30d count, integrated vs non-integrated split, and a misconfiguration flag. Read-only.
* @summary List conversion goals
*/
-export const MarketingAnalyticsConversionGoalsRetrieveParams = /* @__PURE__ */ zod.object({
+export const MarketingAnalyticsConversionGoalsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -24,7 +24,7 @@ export const MarketingAnalyticsConversionGoalsRetrieveParams = /* @__PURE__ */ z
* Remove one conversion goal from the project, leaving the others in place.
* @summary Delete conversion goal
*/
-export const MarketingAnalyticsConversionGoalsDeleteDestroyParams = /* @__PURE__ */ zod.object({
+export const MarketingAnalyticsConversionGoalsDeleteDestroyParams = () => zod.object({
conversion_goal_id: zod.string(),
project_id: zod
.string()
@@ -37,7 +37,7 @@ export const MarketingAnalyticsConversionGoalsDeleteDestroyParams = /* @__PURE__
* Change one conversion goal in place. Fields you send are merged into the stored goal, the rest are kept, and the goal keeps its position in the list. Sending a different `kind` replaces the goal instead, since the shapes don't share their fields.
* @summary Update conversion goal
*/
-export const MarketingAnalyticsConversionGoalsUpdatePartialUpdateParams = /* @__PURE__ */ zod.object({
+export const MarketingAnalyticsConversionGoalsUpdatePartialUpdateParams = () => zod.object({
conversion_goal_id: zod.string(),
project_id: zod
.string()
@@ -242,7 +242,7 @@ export const marketingAnalyticsConversionGoalsUpdatePartialUpdateBodyGoalOneThre
export const marketingAnalyticsConversionGoalsUpdatePartialUpdateBodyGoalOneThreePropertiesOneItemTwofourEventFiltersOneItemFiveTypeDefault = `hogql`
export const marketingAnalyticsConversionGoalsUpdatePartialUpdateBodyGoalOneThreePropertiesOneItemTwofourTypeDefault = `behavioral`
-export const MarketingAnalyticsConversionGoalsUpdatePartialUpdateBody = /* @__PURE__ */ zod
+export const MarketingAnalyticsConversionGoalsUpdatePartialUpdateBody = () => zod
.object({
goal: zod
.union([
@@ -10756,7 +10756,7 @@ export const MarketingAnalyticsConversionGoalsUpdatePartialUpdateBody = /* @__PU
* Add one conversion goal to the project. The server assigns conversion_goal_id and appends the goal to the end of the list, leaving existing goals untouched.
* @summary Create conversion goal
*/
-export const MarketingAnalyticsConversionGoalsCreateCreateParams = /* @__PURE__ */ zod.object({
+export const MarketingAnalyticsConversionGoalsCreateCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -10960,7 +10960,7 @@ export const marketingAnalyticsConversionGoalsCreateCreateBodyGoalOneThreeProper
export const marketingAnalyticsConversionGoalsCreateCreateBodyGoalOneThreePropertiesOneItemTwofourEventFiltersOneItemFiveTypeDefault = `hogql`
export const marketingAnalyticsConversionGoalsCreateCreateBodyGoalOneThreePropertiesOneItemTwofourTypeDefault = `behavioral`
-export const MarketingAnalyticsConversionGoalsCreateCreateBody = /* @__PURE__ */ zod.object({
+export const MarketingAnalyticsConversionGoalsCreateCreateBody = () => zod.object({
goal: zod
.union([
zod.object({
@@ -21442,7 +21442,7 @@ export const MarketingAnalyticsConversionGoalsCreateCreateBody = /* @__PURE__ */
* Check the platform → data-warehouse side of every native marketing integration: connection state, sync recency, row counts, required-table status, and schema-mapping coverage. Read-only.
* @summary List marketing data sources
*/
-export const MarketingAnalyticsDataSourcesRetrieveParams = /* @__PURE__ */ zod.object({
+export const MarketingAnalyticsDataSourcesRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -21450,7 +21450,7 @@ export const MarketingAnalyticsDataSourcesRetrieveParams = /* @__PURE__ */ zod.o
),
})
-export const MarketingAnalyticsDataSourcesRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const MarketingAnalyticsDataSourcesRetrieveQueryParams = () => zod.object({
source_type: zod.string().nullish().describe("Optional. Restrict to one integration (e.g. 'GoogleAds')."),
})
@@ -21458,7 +21458,7 @@ export const MarketingAnalyticsDataSourcesRetrieveQueryParams = /* @__PURE__ */
* Aggregate data-source sync health, UTM attribution health, and conversion-goal config into a single per-integration diagnostic with recommended actions. Read-only.
* @summary Diagnose marketing analytics
*/
-export const MarketingAnalyticsDiagnoseRetrieveParams = /* @__PURE__ */ zod.object({
+export const MarketingAnalyticsDiagnoseRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -21471,7 +21471,7 @@ export const marketingAnalyticsDiagnoseRetrieveQueryAttributionLookbackDaysMax =
export const marketingAnalyticsDiagnoseRetrieveQueryIncludeConversionGoalsDefault = true
-export const MarketingAnalyticsDiagnoseRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const MarketingAnalyticsDiagnoseRetrieveQueryParams = () => zod.object({
attribution_lookback_days: zod
.number()
.min(1)
@@ -21489,7 +21489,7 @@ export const MarketingAnalyticsDiagnoseRetrieveQueryParams = /* @__PURE__ */ zod
* Break down a single conversion goal's events over a period by event name, utm_source, and matched integration, with a small sample of events. Read-only.
* @summary Explain a conversion goal
*/
-export const MarketingAnalyticsExplainConversionGoalRetrieveParams = /* @__PURE__ */ zod.object({
+export const MarketingAnalyticsExplainConversionGoalRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -21497,7 +21497,7 @@ export const MarketingAnalyticsExplainConversionGoalRetrieveParams = /* @__PURE_
),
})
-export const MarketingAnalyticsExplainConversionGoalRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const MarketingAnalyticsExplainConversionGoalRetrieveQueryParams = () => zod.object({
conversion_goal_id: zod
.string()
.min(1)
@@ -21510,7 +21510,7 @@ export const MarketingAnalyticsExplainConversionGoalRetrieveQueryParams = /* @__
* Rank existing custom events as conversion-goal candidates by volume, UTM-tag coverage, and unique users, excluding system/autocaptured events. Read-only.
* @summary Suggest conversion goals
*/
-export const MarketingAnalyticsSuggestConversionGoalsRetrieveParams = /* @__PURE__ */ zod.object({
+export const MarketingAnalyticsSuggestConversionGoalsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -21521,7 +21521,7 @@ export const MarketingAnalyticsSuggestConversionGoalsRetrieveParams = /* @__PURE
export const marketingAnalyticsSuggestConversionGoalsRetrieveQueryMinCountDefault = 50
export const marketingAnalyticsSuggestConversionGoalsRetrieveQueryTopNDefault = 10
-export const MarketingAnalyticsSuggestConversionGoalsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const MarketingAnalyticsSuggestConversionGoalsRetrieveQueryParams = () => zod.object({
min_count: zod
.number()
.default(marketingAnalyticsSuggestConversionGoalsRetrieveQueryMinCountDefault)
@@ -21536,7 +21536,7 @@ export const MarketingAnalyticsSuggestConversionGoalsRetrieveQueryParams = /* @_
* Detect unmatched utm_source values from recent events and propose custom_source_mappings entries, alongside the full utm_source catalogue and current mappings. Read-only.
* @summary Suggest UTM source mappings
*/
-export const MarketingAnalyticsSuggestUtmMappingsRetrieveParams = /* @__PURE__ */ zod.object({
+export const MarketingAnalyticsSuggestUtmMappingsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -21549,7 +21549,7 @@ export const marketingAnalyticsSuggestUtmMappingsRetrieveQueryLookbackDaysMax =
export const marketingAnalyticsSuggestUtmMappingsRetrieveQueryMinEventCountDefault = 10
-export const MarketingAnalyticsSuggestUtmMappingsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const MarketingAnalyticsSuggestUtmMappingsRetrieveQueryParams = () => zod.object({
lookback_days: zod
.number()
.min(1)
@@ -21566,7 +21566,7 @@ export const MarketingAnalyticsSuggestUtmMappingsRetrieveQueryParams = /* @__PUR
* Cross-reference campaigns with spend from ad platforms against pageview events with UTM parameters to identify tracking issues.
* @summary Run UTM audit
*/
-export const MarketingAnalyticsUtmAuditRetrieveParams = /* @__PURE__ */ zod.object({
+export const MarketingAnalyticsUtmAuditRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -21576,7 +21576,7 @@ export const MarketingAnalyticsUtmAuditRetrieveParams = /* @__PURE__ */ zod.obje
export const marketingAnalyticsUtmAuditRetrieveQueryDateFromDefault = `-30d`
-export const MarketingAnalyticsUtmAuditRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const MarketingAnalyticsUtmAuditRetrieveQueryParams = () => zod.object({
date_from: zod
.string()
.min(1)
diff --git a/services/mcp/src/generated/mcp_analytics/api.ts b/services/mcp/src/generated/mcp_analytics/api.ts
index b676e62afd1b..662904ed7dce 100644
--- a/services/mcp/src/generated/mcp_analytics/api.ts
+++ b/services/mcp/src/generated/mcp_analytics/api.ts
@@ -11,7 +11,7 @@ import * as zod from 'zod'
/**
* Create a new MCP feedback submission for the current project.
*/
-export const McpAnalyticsFeedbackCreateParams = /* @__PURE__ */ zod.object({
+export const McpAnalyticsFeedbackCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -46,7 +46,7 @@ export const mcpAnalyticsFeedbackCreateBodyFeedbackMax = 5000
export const mcpAnalyticsFeedbackCreateBodyCategoryDefault = `other`
-export const McpAnalyticsFeedbackCreateBody = /* @__PURE__ */ zod.object({
+export const McpAnalyticsFeedbackCreateBody = () => zod.object({
attempted_tool: zod
.string()
.max(mcpAnalyticsFeedbackCreateBodyAttemptedToolMax)
@@ -104,7 +104,7 @@ export const McpAnalyticsFeedbackCreateBody = /* @__PURE__ */ zod.object({
/**
* Return the most recent intent cluster snapshot for the current project. Returns an empty IDLE snapshot when no clustering run has happened yet.
*/
-export const McpAnalyticsIntentClustersRetrieveParams = /* @__PURE__ */ zod.object({
+export const McpAnalyticsIntentClustersRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -112,7 +112,7 @@ export const McpAnalyticsIntentClustersRetrieveParams = /* @__PURE__ */ zod.obje
),
})
-export const McpAnalyticsIntentClustersRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const McpAnalyticsIntentClustersRetrieveQueryParams = () => zod.object({
tool: zod
.string()
.optional()
@@ -124,7 +124,7 @@ export const McpAnalyticsIntentClustersRetrieveQueryParams = /* @__PURE__ */ zod
/**
* Trigger an asynchronous recompute of the intent cluster snapshot. The task runs in the background; poll the GET endpoint for progress (status transitions to 'idle' or 'error').
*/
-export const McpAnalyticsIntentClustersRecomputeParams = /* @__PURE__ */ zod.object({
+export const McpAnalyticsIntentClustersRecomputeParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -135,7 +135,7 @@ export const McpAnalyticsIntentClustersRecomputeParams = /* @__PURE__ */ zod.obj
/**
* Create a new missing capability report for the current project.
*/
-export const McpAnalyticsMissingCapabilitiesCreateParams = /* @__PURE__ */ zod.object({
+export const McpAnalyticsMissingCapabilitiesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -170,7 +170,7 @@ export const mcpAnalyticsMissingCapabilitiesCreateBodyMissingCapabilityMax = 500
export const mcpAnalyticsMissingCapabilitiesCreateBodyBlockedDefault = true
-export const McpAnalyticsMissingCapabilitiesCreateBody = /* @__PURE__ */ zod.object({
+export const McpAnalyticsMissingCapabilitiesCreateBody = () => zod.object({
attempted_tool: zod
.string()
.max(mcpAnalyticsMissingCapabilitiesCreateBodyAttemptedToolMax)
@@ -223,7 +223,7 @@ export const McpAnalyticsMissingCapabilitiesCreateBody = /* @__PURE__ */ zod.obj
/**
* List MCP sessions for the current project, derived by grouping $mcp_tool_call events by $mcp_session_id. Ordered by newest session start first by default.
*/
-export const McpAnalyticsSessionsListParams = /* @__PURE__ */ zod.object({
+export const McpAnalyticsSessionsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -240,7 +240,7 @@ export const mcpAnalyticsSessionsListQueryOffsetMin = 0
export const mcpAnalyticsSessionsListQueryOrderByDefault = ``
export const mcpAnalyticsSessionsListQuerySearchDefault = ``
-export const McpAnalyticsSessionsListQueryParams = /* @__PURE__ */ zod.object({
+export const McpAnalyticsSessionsListQueryParams = () => zod.object({
date_from: zod
.string()
.optional()
@@ -281,7 +281,7 @@ export const McpAnalyticsSessionsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Generate (or return the cached) LLM summary of the agent's goal for a session, derived from its recorded $mcp_intents. The first call summarises and persists the result; subsequent calls return the stored summary.
*/
-export const McpAnalyticsSessionsGenerateIntentParams = /* @__PURE__ */ zod.object({
+export const McpAnalyticsSessionsGenerateIntentParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this mcp analytics submission.'),
project_id: zod
.string()
@@ -290,7 +290,7 @@ export const McpAnalyticsSessionsGenerateIntentParams = /* @__PURE__ */ zod.obje
),
})
-export const McpAnalyticsSessionsGenerateIntentQueryParams = /* @__PURE__ */ zod.object({
+export const McpAnalyticsSessionsGenerateIntentQueryParams = () => zod.object({
date_from: zod.iso
.datetime({ offset: true })
.optional()
@@ -302,7 +302,7 @@ export const McpAnalyticsSessionsGenerateIntentQueryParams = /* @__PURE__ */ zod
/**
* List a page of the $mcp_tool_call events that belong to a given $session_id, in chronological order.
*/
-export const McpAnalyticsSessionsToolCallsParams = /* @__PURE__ */ zod.object({
+export const McpAnalyticsSessionsToolCallsParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this mcp analytics submission.'),
project_id: zod
.string()
@@ -317,7 +317,7 @@ export const mcpAnalyticsSessionsToolCallsQueryLimitMax = 500
export const mcpAnalyticsSessionsToolCallsQueryOffsetDefault = 0
export const mcpAnalyticsSessionsToolCallsQueryOffsetMin = 0
-export const McpAnalyticsSessionsToolCallsQueryParams = /* @__PURE__ */ zod.object({
+export const McpAnalyticsSessionsToolCallsQueryParams = () => zod.object({
date_from: zod.iso
.datetime({ offset: true })
.optional()
diff --git a/services/mcp/src/generated/mcp_store/api.ts b/services/mcp/src/generated/mcp_store/api.ts
index 142543f1219a..e7567ac07f6c 100644
--- a/services/mcp/src/generated/mcp_store/api.ts
+++ b/services/mcp/src/generated/mcp_store/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const McpServerInstallationsListParams = /* @__PURE__ */ zod.object({
+export const McpServerInstallationsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,12 +16,12 @@ export const McpServerInstallationsListParams = /* @__PURE__ */ zod.object({
),
})
-export const McpServerInstallationsListQueryParams = /* @__PURE__ */ zod.object({
+export const McpServerInstallationsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const McpServerInstallationsToolsRetrieveParams = /* @__PURE__ */ zod.object({
+export const McpServerInstallationsToolsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this mcp server installation.'),
project_id: zod
.string()
diff --git a/services/mcp/src/generated/messaging/api.ts b/services/mcp/src/generated/messaging/api.ts
index d054c731e3a8..7279f6335497 100644
--- a/services/mcp/src/generated/messaging/api.ts
+++ b/services/mcp/src/generated/messaging/api.ts
@@ -12,7 +12,7 @@ import * as zod from 'zod'
* Opt every recipient in the list out of the category named on their entry, or a default category.
* @summary Add multiple recipients to the opt-out list
*/
-export const MessagingPreferencesBulkAddOptOutsCreateParams = /* @__PURE__ */ zod.object({
+export const MessagingPreferencesBulkAddOptOutsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -22,7 +22,7 @@ export const MessagingPreferencesBulkAddOptOutsCreateParams = /* @__PURE__ */ zo
export const messagingPreferencesBulkAddOptOutsCreateBodyOptOutsItemIdentifierMax = 512
-export const MessagingPreferencesBulkAddOptOutsCreateBody = /* @__PURE__ */ zod.object({
+export const MessagingPreferencesBulkAddOptOutsCreateBody = () => zod.object({
opt_outs: zod
.array(
zod.object({
@@ -49,7 +49,7 @@ export const MessagingPreferencesBulkAddOptOutsCreateBody = /* @__PURE__ */ zod.
* Get opt-outs filtered by category or overall opt-outs if no category specified
* @summary List recipients opted out of a message category
*/
-export const MessagingPreferencesOptOutsRetrieveParams = /* @__PURE__ */ zod.object({
+export const MessagingPreferencesOptOutsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -59,7 +59,7 @@ export const MessagingPreferencesOptOutsRetrieveParams = /* @__PURE__ */ zod.obj
export const messagingPreferencesOptOutsRetrieveQuerySearchMax = 512
-export const MessagingPreferencesOptOutsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const MessagingPreferencesOptOutsRetrieveQueryParams = () => zod.object({
category_key: zod
.string()
.optional()
@@ -79,7 +79,7 @@ export const MessagingPreferencesOptOutsRetrieveQueryParams = /* @__PURE__ */ zo
* Opt a recipient back in to a specific category, or to all marketing messages.
* @summary Remove a recipient from the opt-out list
*/
-export const MessagingPreferencesRemoveOptOutCreateParams = /* @__PURE__ */ zod.object({
+export const MessagingPreferencesRemoveOptOutCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -89,7 +89,7 @@ export const MessagingPreferencesRemoveOptOutCreateParams = /* @__PURE__ */ zod.
export const messagingPreferencesRemoveOptOutCreateBodyIdentifierMax = 512
-export const MessagingPreferencesRemoveOptOutCreateBody = /* @__PURE__ */ zod.object({
+export const MessagingPreferencesRemoveOptOutCreateBody = () => zod.object({
identifier: zod
.string()
.max(messagingPreferencesRemoveOptOutCreateBodyIdentifierMax)
diff --git a/services/mcp/src/generated/metrics/api.ts b/services/mcp/src/generated/metrics/api.ts
index e90e80f41d61..9398360d2453 100644
--- a/services/mcp/src/generated/metrics/api.ts
+++ b/services/mcp/src/generated/metrics/api.ts
@@ -12,7 +12,7 @@ import * as zod from 'zod'
* Characterize a metric anomaly: compare an anomaly window against a
* baseline, find the onset, and rank which label values moved.
*/
-export const MetricsCharacterizeCreateParams = /* @__PURE__ */ zod.object({
+export const MetricsCharacterizeCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -33,7 +33,7 @@ export const metricsCharacterizeCreateBodyQueryOneFiltersItemValueMax = 1024
export const metricsCharacterizeCreateBodyQueryOneFiltersItemScopeDefault = `auto`
export const metricsCharacterizeCreateBodyQueryOneCandidateKeysItemMax = 255
-export const MetricsCharacterizeCreateBody = /* @__PURE__ */ zod.object({
+export const MetricsCharacterizeCreateBody = () => zod.object({
query: zod
.object({
metricName: zod
@@ -121,7 +121,7 @@ export const MetricsCharacterizeCreateBody = /* @__PURE__ */ zod.object({
.describe('The anomaly characterization to run.'),
})
-export const MetricsQueryCreateParams = /* @__PURE__ */ zod.object({
+export const MetricsQueryCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -163,7 +163,7 @@ export const metricsQueryCreateBodyQueryOneClausesItemGroupByItemKeyMax = 255
export const metricsQueryCreateBodyQueryOneClausesItemGroupByItemScopeDefault = `auto`
export const metricsQueryCreateBodyQueryOneFormulaMax = 512
-export const MetricsQueryCreateBody = /* @__PURE__ */ zod.object({
+export const MetricsQueryCreateBody = () => zod.object({
query: zod
.object({
metricName: zod
@@ -386,7 +386,7 @@ export const MetricsQueryCreateBody = /* @__PURE__ */ zod.object({
/**
* Distinct metric names for the team. Backs the picker UI.
*/
-export const MetricsValuesRetrieveParams = /* @__PURE__ */ zod.object({
+export const MetricsValuesRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -402,7 +402,7 @@ export const metricsValuesRetrieveQueryServiceMax = 1024
export const metricsValuesRetrieveQueryValueDefault = ``
export const metricsValuesRetrieveQueryValueMax = 255
-export const MetricsValuesRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const MetricsValuesRetrieveQueryParams = () => zod.object({
limit: zod
.number()
.min(1)
diff --git a/services/mcp/src/generated/notebooks/api.ts b/services/mcp/src/generated/notebooks/api.ts
index 52b795f2aede..e51e191ce735 100644
--- a/services/mcp/src/generated/notebooks/api.ts
+++ b/services/mcp/src/generated/notebooks/api.ts
@@ -11,7 +11,7 @@ import * as zod from 'zod'
/**
* The API for interacting with Notebooks. This feature is in early access and the API can have breaking changes without announcement.
*/
-export const NotebooksListParams = /* @__PURE__ */ zod.object({
+export const NotebooksListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -19,7 +19,7 @@ export const NotebooksListParams = /* @__PURE__ */ zod.object({
),
})
-export const NotebooksListQueryParams = /* @__PURE__ */ zod.object({
+export const NotebooksListQueryParams = () => zod.object({
contains: zod
.string()
.optional()
@@ -46,7 +46,7 @@ export const NotebooksListQueryParams = /* @__PURE__ */ zod.object({
/**
* The API for interacting with Notebooks. This feature is in early access and the API can have breaking changes without announcement.
*/
-export const NotebooksCreateParams = /* @__PURE__ */ zod.object({
+export const NotebooksCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -61,7 +61,7 @@ export const notebooksCreateBodyVersionMax = 2147483647
export const notebooksCreateBodyVariablesItemNameMax = 200
-export const NotebooksCreateBody = /* @__PURE__ */ zod.object({
+export const NotebooksCreateBody = () => zod.object({
title: zod.string().max(notebooksCreateBodyTitleMax).nullish().describe('Title of the notebook.'),
content: zod.unknown().optional().describe('Notebook content as a ProseMirror JSON document structure.'),
text_content: zod.string().nullish().describe('Plain text representation of the notebook content for search.'),
@@ -107,7 +107,7 @@ export const NotebooksCreateBody = /* @__PURE__ */ zod.object({
/**
* The API for interacting with Notebooks. This feature is in early access and the API can have breaking changes without announcement.
*/
-export const NotebooksRetrieveParams = /* @__PURE__ */ zod.object({
+export const NotebooksRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -119,7 +119,7 @@ export const NotebooksRetrieveParams = /* @__PURE__ */ zod.object({
/**
* The API for interacting with Notebooks. This feature is in early access and the API can have breaking changes without announcement.
*/
-export const NotebooksPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const NotebooksPartialUpdateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -135,7 +135,7 @@ export const notebooksPartialUpdateBodyVersionMax = 2147483647
export const notebooksPartialUpdateBodyVariablesItemNameMax = 200
-export const NotebooksPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const NotebooksPartialUpdateBody = () => zod.object({
title: zod.string().max(notebooksPartialUpdateBodyTitleMax).nullish().describe('Title of the notebook.'),
content: zod.unknown().optional().describe('Notebook content as a ProseMirror JSON document structure.'),
text_content: zod.string().nullish().describe('Plain text representation of the notebook content for search.'),
@@ -181,7 +181,7 @@ export const NotebooksPartialUpdateBody = /* @__PURE__ */ zod.object({
/**
* Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
*/
-export const NotebooksDestroyParams = /* @__PURE__ */ zod.object({
+export const NotebooksDestroyParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -193,7 +193,7 @@ export const NotebooksDestroyParams = /* @__PURE__ */ zod.object({
/**
* Set the notebook's kernel compute configuration. Applies at sandbox provision time: a currently running kernel keeps its resources until restarted.
*/
-export const NotebooksKernelConfigCreateParams = /* @__PURE__ */ zod.object({
+export const NotebooksKernelConfigCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -202,7 +202,7 @@ export const NotebooksKernelConfigCreateParams = /* @__PURE__ */ zod.object({
short_id: zod.string(),
})
-export const NotebooksKernelConfigCreateBody = /* @__PURE__ */ zod.object({
+export const NotebooksKernelConfigCreateBody = () => zod.object({
cpu_cores: zod
.number()
.optional()
@@ -220,7 +220,7 @@ export const NotebooksKernelConfigCreateBody = /* @__PURE__ */ zod.object({
/**
* Live-checked kernel runtime state for this notebook, its compute configuration, and the catalog of dataframes/tables a cell can currently reference (with column schemas).
*/
-export const NotebooksKernelStatusRetrieveParams = /* @__PURE__ */ zod.object({
+export const NotebooksKernelStatusRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -232,7 +232,7 @@ export const NotebooksKernelStatusRetrieveParams = /* @__PURE__ */ zod.object({
/**
* Read a run's durable state: its status, and — once done or interrupted — the result envelope (columns, first rows, stdout/stderr, media, error). Poll until terminal. Flag-gated (revamped-py-notebooks).
*/
-export const NotebooksSqlV2RunsRetrieveParams = /* @__PURE__ */ zod.object({
+export const NotebooksSqlV2RunsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -245,7 +245,7 @@ export const NotebooksSqlV2RunsRetrieveParams = /* @__PURE__ */ zod.object({
/**
* Stop a running cell. Idempotent: interrupting an already-finished run returns its outcome unchanged. Flag-gated (revamped-py-notebooks).
*/
-export const NotebooksSqlV2RunsInterruptCreateParams = /* @__PURE__ */ zod.object({
+export const NotebooksSqlV2RunsInterruptCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -258,7 +258,7 @@ export const NotebooksSqlV2RunsInterruptCreateParams = /* @__PURE__ */ zod.objec
/**
* The full notebook view for agents: title, document source (markdown, or raw content for legacy rich-text notebooks), every cell with its dependency edges and derived run status (including staleness), and the kernel's runtime state and compute config. Flag-gated (revamped-py-notebooks).
*/
-export const NotebooksSqlV2StateRetrieveParams = /* @__PURE__ */ zod.object({
+export const NotebooksSqlV2StateRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
diff --git a/services/mcp/src/generated/persons/api.ts b/services/mcp/src/generated/persons/api.ts
index f47e02e2f2c6..9114d3d8ca8c 100644
--- a/services/mcp/src/generated/persons/api.ts
+++ b/services/mcp/src/generated/persons/api.ts
@@ -11,7 +11,7 @@ import * as zod from 'zod'
/**
* This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
*/
-export const PersonsListParams = /* @__PURE__ */ zod.object({
+export const PersonsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -23,7 +23,7 @@ export const personsListQueryPropertiesItemTypeDefault = `AND`
export const personsListQueryPropertiesItemValuesItemOperatorDefault = `exact`
export const personsListQueryPropertiesItemValuesItemTypeDefault = `event`
-export const PersonsListQueryParams = /* @__PURE__ */ zod.object({
+export const PersonsListQueryParams = () => zod.object({
client_query_id: zod
.string()
.optional()
@@ -150,7 +150,7 @@ export const PersonsListQueryParams = /* @__PURE__ */ zod.object({
/**
* This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
*/
-export const PersonsRetrieveParams = /* @__PURE__ */ zod.object({
+export const PersonsRetrieveParams = () => zod.object({
id: zod.string().describe('A unique value identifying this person. Accepts both numeric ID and UUID.'),
project_id: zod
.string()
@@ -159,14 +159,14 @@ export const PersonsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const PersonsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const PersonsRetrieveQueryParams = () => zod.object({
format: zod.enum(['csv', 'json']).optional(),
})
/**
* This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
*/
-export const PersonsDeletePropertyCreateParams = /* @__PURE__ */ zod.object({
+export const PersonsDeletePropertyCreateParams = () => zod.object({
id: zod.string().describe('A unique value identifying this person. Accepts both numeric ID and UUID.'),
project_id: zod
.string()
@@ -175,13 +175,13 @@ export const PersonsDeletePropertyCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const PersonsDeletePropertyCreateQueryParams = /* @__PURE__ */ zod.object({
+export const PersonsDeletePropertyCreateQueryParams = () => zod.object({
format: zod.enum(['csv', 'json']).optional(),
})
export const personsDeletePropertyCreateBodyUnsetTwoMax = 1000
-export const PersonsDeletePropertyCreateBody = /* @__PURE__ */ zod.object({
+export const PersonsDeletePropertyCreateBody = () => zod.object({
$unset: zod
.union([
zod.string().min(1),
@@ -193,7 +193,7 @@ export const PersonsDeletePropertyCreateBody = /* @__PURE__ */ zod.object({
/**
* This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
*/
-export const PersonsUpdatePropertyCreateParams = /* @__PURE__ */ zod.object({
+export const PersonsUpdatePropertyCreateParams = () => zod.object({
id: zod.string().describe('A unique value identifying this person. Accepts both numeric ID and UUID.'),
project_id: zod
.string()
@@ -202,11 +202,11 @@ export const PersonsUpdatePropertyCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const PersonsUpdatePropertyCreateQueryParams = /* @__PURE__ */ zod.object({
+export const PersonsUpdatePropertyCreateQueryParams = () => zod.object({
format: zod.enum(['csv', 'json']).optional(),
})
-export const PersonsUpdatePropertyCreateBody = /* @__PURE__ */ zod.object({
+export const PersonsUpdatePropertyCreateBody = () => zod.object({
key: zod.string().describe('The property key to set.'),
value: zod.unknown().describe('The property value. Can be a string, number, boolean, or object.'),
})
@@ -214,7 +214,7 @@ export const PersonsUpdatePropertyCreateBody = /* @__PURE__ */ zod.object({
/**
* This endpoint allows you to bulk delete persons, either by the PostHog person IDs or by distinct IDs. You can pass in a maximum of 1000 IDs per call. Only events captured before the request will be deleted.
*/
-export const PersonsBulkDeleteCreateParams = /* @__PURE__ */ zod.object({
+export const PersonsBulkDeleteCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -222,7 +222,7 @@ export const PersonsBulkDeleteCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const PersonsBulkDeleteCreateQueryParams = /* @__PURE__ */ zod.object({
+export const PersonsBulkDeleteCreateQueryParams = () => zod.object({
format: zod.enum(['csv', 'json']).optional(),
})
@@ -230,7 +230,7 @@ export const personsBulkDeleteCreateBodyDeleteEventsDefault = false
export const personsBulkDeleteCreateBodyDeleteRecordingsDefault = false
export const personsBulkDeleteCreateBodyKeepPersonDefault = false
-export const PersonsBulkDeleteCreateBody = /* @__PURE__ */ zod.object({
+export const PersonsBulkDeleteCreateBody = () => zod.object({
ids: zod.array(zod.string()).optional().describe('A list of PostHog person UUIDs to delete (max 1000).'),
distinct_ids: zod
.array(zod.string())
@@ -253,7 +253,7 @@ export const PersonsBulkDeleteCreateBody = /* @__PURE__ */ zod.object({
/**
* This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
*/
-export const PersonsCohortsRetrieveParams = /* @__PURE__ */ zod.object({
+export const PersonsCohortsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -261,7 +261,7 @@ export const PersonsCohortsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const PersonsCohortsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const PersonsCohortsRetrieveQueryParams = () => zod.object({
format: zod.enum(['csv', 'json']).optional(),
person_id: zod.string().describe('The person ID or UUID to get cohorts for.'),
})
@@ -269,7 +269,7 @@ export const PersonsCohortsRetrieveQueryParams = /* @__PURE__ */ zod.object({
/**
* This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the [capture API](https://posthog.com/docs/api/capture), the `$set` and `$unset` [properties](https://posthog.com/docs/product-analytics/user-properties), or one of our SDKs.
*/
-export const PersonsValuesRetrieveParams = /* @__PURE__ */ zod.object({
+export const PersonsValuesRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -277,7 +277,7 @@ export const PersonsValuesRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const PersonsValuesRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const PersonsValuesRetrieveQueryParams = () => zod.object({
format: zod.enum(['csv', 'json']).optional(),
key: zod.string().describe("The person property key to get values for (e.g., 'email', 'plan', 'role')."),
value: zod
diff --git a/services/mcp/src/generated/platform_features/api.ts b/services/mcp/src/generated/platform_features/api.ts
index 9bf3b6441e47..03516f024eb3 100644
--- a/services/mcp/src/generated/platform_features/api.ts
+++ b/services/mcp/src/generated/platform_features/api.ts
@@ -8,22 +8,22 @@
*/
import * as zod from 'zod'
-export const ListQueryParams = /* @__PURE__ */ zod.object({
+export const ListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const RetrieveParams = /* @__PURE__ */ zod.object({
+export const RetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this organization.'),
})
-export const PartialUpdateParams = /* @__PURE__ */ zod.object({
+export const PartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this organization.'),
})
export const partialUpdateBodyNameMax = 64
-export const PartialUpdateBody = /* @__PURE__ */ zod.object({
+export const PartialUpdateBody = () => zod.object({
name: zod.string().max(partialUpdateBodyNameMax).optional(),
logo_media_id: zod.string().nullish(),
enforce_2fa: zod.boolean().nullish(),
@@ -79,7 +79,7 @@ export const PartialUpdateBody = /* @__PURE__ */ zod.object({
.describe('ID of the role to automatically assign to new members joining the organization'),
})
-export const MembersListParams = /* @__PURE__ */ zod.object({
+export const MembersListParams = () => zod.object({
organization_id: zod
.string()
.describe(
@@ -87,7 +87,7 @@ export const MembersListParams = /* @__PURE__ */ zod.object({
),
})
-export const MembersListQueryParams = /* @__PURE__ */ zod.object({
+export const MembersListQueryParams = () => zod.object({
email_domain: zod
.string()
.optional()
@@ -113,7 +113,7 @@ export const MembersListQueryParams = /* @__PURE__ */ zod.object({
),
})
-export const MembersGithubLoginRetrieveParams = /* @__PURE__ */ zod.object({
+export const MembersGithubLoginRetrieveParams = () => zod.object({
organization_id: zod
.string()
.describe(
@@ -126,7 +126,7 @@ export const MembersGithubLoginRetrieveParams = /* @__PURE__ */ zod.object({
* Role endpoints disclose member records, so they scope them the same way the members list
* does when the org restricts member list visibility.
*/
-export const RolesListParams = /* @__PURE__ */ zod.object({
+export const RolesListParams = () => zod.object({
organization_id: zod
.string()
.describe(
@@ -134,7 +134,7 @@ export const RolesListParams = /* @__PURE__ */ zod.object({
),
})
-export const RolesListQueryParams = /* @__PURE__ */ zod.object({
+export const RolesListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
@@ -143,7 +143,7 @@ export const RolesListQueryParams = /* @__PURE__ */ zod.object({
* Role endpoints disclose member records, so they scope them the same way the members list
* does when the org restricts member list visibility.
*/
-export const RolesRetrieveParams = /* @__PURE__ */ zod.object({
+export const RolesRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this role.'),
organization_id: zod
.string()
@@ -156,7 +156,7 @@ export const RolesRetrieveParams = /* @__PURE__ */ zod.object({
* Role endpoints disclose member records, so they scope them the same way the members list
* does when the org restricts member list visibility.
*/
-export const RolesRoleMembershipsListParams = /* @__PURE__ */ zod.object({
+export const RolesRoleMembershipsListParams = () => zod.object({
organization_id: zod
.string()
.describe(
@@ -165,12 +165,12 @@ export const RolesRoleMembershipsListParams = /* @__PURE__ */ zod.object({
role_id: zod.string(),
})
-export const RolesRoleMembershipsListQueryParams = /* @__PURE__ */ zod.object({
+export const RolesRoleMembershipsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const AdvancedActivityLogsListParams = /* @__PURE__ */ zod.object({
+export const AdvancedActivityLogsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -193,7 +193,7 @@ export const advancedActivityLogsListQueryScopesDefault = []
export const advancedActivityLogsListQueryTeamIdsDefault = []
export const advancedActivityLogsListQueryUsersDefault = []
-export const AdvancedActivityLogsListQueryParams = /* @__PURE__ */ zod.object({
+export const AdvancedActivityLogsListQueryParams = () => zod.object({
activities: zod
.array(zod.string())
.default(advancedActivityLogsListQueryActivitiesDefault)
@@ -287,7 +287,7 @@ export const AdvancedActivityLogsListQueryParams = /* @__PURE__ */ zod.object({
.describe('When set, filters rows where the actor was impersonating another user.'),
})
-export const AdvancedActivityLogsAvailableFiltersRetrieveParams = /* @__PURE__ */ zod.object({
+export const AdvancedActivityLogsAvailableFiltersRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -295,7 +295,7 @@ export const AdvancedActivityLogsAvailableFiltersRetrieveParams = /* @__PURE__ *
),
})
-export const ApprovalPoliciesListParams = /* @__PURE__ */ zod.object({
+export const ApprovalPoliciesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -303,12 +303,12 @@ export const ApprovalPoliciesListParams = /* @__PURE__ */ zod.object({
),
})
-export const ApprovalPoliciesListQueryParams = /* @__PURE__ */ zod.object({
+export const ApprovalPoliciesListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const ApprovalPoliciesRetrieveParams = /* @__PURE__ */ zod.object({
+export const ApprovalPoliciesRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this approval policy.'),
project_id: zod
.string()
@@ -317,7 +317,7 @@ export const ApprovalPoliciesRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const ChangeRequestsListParams = /* @__PURE__ */ zod.object({
+export const ChangeRequestsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -325,7 +325,7 @@ export const ChangeRequestsListParams = /* @__PURE__ */ zod.object({
),
})
-export const ChangeRequestsListQueryParams = /* @__PURE__ */ zod.object({
+export const ChangeRequestsListQueryParams = () => zod.object({
action_key: zod.string().optional(),
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
@@ -335,7 +335,7 @@ export const ChangeRequestsListQueryParams = /* @__PURE__ */ zod.object({
state: zod.array(zod.string()).optional().describe('Multiple values may be separated by commas.'),
})
-export const ChangeRequestsRetrieveParams = /* @__PURE__ */ zod.object({
+export const ChangeRequestsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this change request.'),
project_id: zod
.string()
@@ -348,7 +348,7 @@ export const ChangeRequestsRetrieveParams = /* @__PURE__ */ zod.object({
* Approve a change request.
* If quorum is reached, automatically applies the change immediately.
*/
-export const ChangeRequestsApproveCreateParams = /* @__PURE__ */ zod.object({
+export const ChangeRequestsApproveCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this change request.'),
project_id: zod
.string()
@@ -357,14 +357,14 @@ export const ChangeRequestsApproveCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const ChangeRequestsApproveCreateBody = /* @__PURE__ */ zod.object({
+export const ChangeRequestsApproveCreateBody = () => zod.object({
reason: zod.string().optional().describe('Optional note recorded with the approval vote explaining the decision.'),
})
/**
* Reject a change request.
*/
-export const ChangeRequestsRejectCreateParams = /* @__PURE__ */ zod.object({
+export const ChangeRequestsRejectCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this change request.'),
project_id: zod
.string()
@@ -373,7 +373,7 @@ export const ChangeRequestsRejectCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const ChangeRequestsRejectCreateBody = /* @__PURE__ */ zod.object({
+export const ChangeRequestsRejectCreateBody = () => zod.object({
reason: zod
.string()
.describe(
@@ -381,7 +381,7 @@ export const ChangeRequestsRejectCreateBody = /* @__PURE__ */ zod.object({
),
})
-export const CommentsListParams = /* @__PURE__ */ zod.object({
+export const CommentsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -389,7 +389,7 @@ export const CommentsListParams = /* @__PURE__ */ zod.object({
),
})
-export const CommentsListQueryParams = /* @__PURE__ */ zod.object({
+export const CommentsListQueryParams = () => zod.object({
completed: zod
.enum(['any', 'open', 'completed'])
.optional()
@@ -426,7 +426,7 @@ export const CommentsListQueryParams = /* @__PURE__ */ zod.object({
* ticket within a short window returns the original comment with a 200 instead of creating a
* second one, and a 409 while a concurrent request is still creating it.
*/
-export const CommentsCreateParams = /* @__PURE__ */ zod.object({
+export const CommentsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -439,7 +439,7 @@ export const commentsCreateBodyScopeMax = 79
export const commentsCreateBodyIsTaskDefault = false
export const commentsCreateBodyItemIdMax = 72
-export const CommentsCreateBody = /* @__PURE__ */ zod.object({
+export const CommentsCreateBody = () => zod.object({
scope: zod.string().max(commentsCreateBodyScopeMax).optional(),
item_context: zod
.unknown()
@@ -460,7 +460,7 @@ export const CommentsCreateBody = /* @__PURE__ */ zod.object({
source_comment: zod.string().nullish(),
})
-export const CommentsRetrieveParams = /* @__PURE__ */ zod.object({
+export const CommentsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this comment.'),
project_id: zod
.string()
@@ -469,7 +469,7 @@ export const CommentsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const CommentsThreadRetrieveParams = /* @__PURE__ */ zod.object({
+export const CommentsThreadRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this comment.'),
project_id: zod
.string()
@@ -478,7 +478,7 @@ export const CommentsThreadRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const CommentsCountRetrieveParams = /* @__PURE__ */ zod.object({
+export const CommentsCountRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -489,18 +489,18 @@ export const CommentsCountRetrieveParams = /* @__PURE__ */ zod.object({
/**
* Get the authenticated user's pinned sidebar tabs and configured homepage for the current team. Pass `@me` as the UUID.
*/
-export const UserHomeSettingsRetrieveParams = /* @__PURE__ */ zod.object({
+export const UserHomeSettingsRetrieveParams = () => zod.object({
uuid: zod.string(),
})
/**
* Update the authenticated user's pinned sidebar tabs and/or homepage for the current team. Pass `@me` as the UUID. Send `tabs` to replace the pinned tab list, `homepage` to set the home destination (any PostHog URL — dashboard, insight, search results, scene). Either field may be omitted to leave it unchanged; sending `homepage: null` or `{}` clears the homepage.
*/
-export const UserHomeSettingsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const UserHomeSettingsPartialUpdateParams = () => zod.object({
uuid: zod.string(),
})
-export const UserHomeSettingsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const UserHomeSettingsPartialUpdateBody = () => zod.object({
tabs: zod
.array(
zod.object({
diff --git a/services/mcp/src/generated/posthog_ai/api.ts b/services/mcp/src/generated/posthog_ai/api.ts
index 65992edadbb3..204d59f90526 100644
--- a/services/mcp/src/generated/posthog_ai/api.ts
+++ b/services/mcp/src/generated/posthog_ai/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const ConversationsListParams = /* @__PURE__ */ zod.object({
+export const ConversationsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,12 +16,12 @@ export const ConversationsListParams = /* @__PURE__ */ zod.object({
),
})
-export const ConversationsListQueryParams = /* @__PURE__ */ zod.object({
+export const ConversationsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const ConversationsRetrieveParams = /* @__PURE__ */ zod.object({
+export const ConversationsRetrieveParams = () => zod.object({
conversation: zod.string().describe('A UUID string identifying this conversation.'),
project_id: zod
.string()
diff --git a/services/mcp/src/generated/product_analytics/api.ts b/services/mcp/src/generated/product_analytics/api.ts
index 2b2e1f630027..0cd79a339582 100644
--- a/services/mcp/src/generated/product_analytics/api.ts
+++ b/services/mcp/src/generated/product_analytics/api.ts
@@ -13,7 +13,7 @@ import * as zod from 'zod'
* they occurred on, ordered by count. Defaults to all three event types; narrow with the
* include parameter.
*/
-export const ElementsStatsRetrieveParams = /* @__PURE__ */ zod.object({
+export const ElementsStatsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -21,7 +21,7 @@ export const ElementsStatsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const ElementsStatsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const ElementsStatsRetrieveQueryParams = () => zod.object({
data_attributes: zod
.string()
.optional()
@@ -64,7 +64,7 @@ export const ElementsStatsRetrieveQueryParams = /* @__PURE__ */ zod.object({
* initial() (auth + permissions + throttling) before returning the
* cached response, ensuring the request is authorized.
*/
-export const InsightsListParams = /* @__PURE__ */ zod.object({
+export const InsightsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -74,7 +74,7 @@ export const InsightsListParams = /* @__PURE__ */ zod.object({
export const insightsListQueryRefreshDefault = `force_cache`
-export const InsightsListQueryParams = /* @__PURE__ */ zod.object({
+export const InsightsListQueryParams = () => zod.object({
basic: zod.boolean().optional().describe('Return basic insight metadata only (no results, faster).'),
created_by: zod
.string()
@@ -178,7 +178,7 @@ export const InsightsListQueryParams = /* @__PURE__ */ zod.object({
* initial() (auth + permissions + throttling) before returning the
* cached response, ensuring the request is authorized.
*/
-export const InsightsCreateParams = /* @__PURE__ */ zod.object({
+export const InsightsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -186,7 +186,7 @@ export const InsightsCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const InsightsCreateQueryParams = /* @__PURE__ */ zod.object({
+export const InsightsCreateQueryParams = () => zod.object({
format: zod.enum(['csv', 'json']).optional(),
include_dashboards: zod
.boolean()
@@ -205,7 +205,7 @@ export const insightsCreateBodyOrderMax = 2147483647
export const insightsCreateBodyDescriptionMax = 400
-export const InsightsCreateBody = /* @__PURE__ */ zod
+export const InsightsCreateBody = () => zod
.object({
name: zod.string().max(insightsCreateBodyNameMax).nullish(),
derived_name: zod.string().max(insightsCreateBodyDerivedNameMax).nullish(),
@@ -232,7 +232,7 @@ export const InsightsCreateBody = /* @__PURE__ */ zod
* initial() (auth + permissions + throttling) before returning the
* cached response, ensuring the request is authorized.
*/
-export const InsightsRetrieveParams = /* @__PURE__ */ zod.object({
+export const InsightsRetrieveParams = () => zod.object({
id: zod
.union([zod.number(), zod.string()])
.describe('Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight.'),
@@ -245,7 +245,7 @@ export const InsightsRetrieveParams = /* @__PURE__ */ zod.object({
export const insightsRetrieveQueryRefreshDefault = `force_cache`
-export const InsightsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const InsightsRetrieveQueryParams = () => zod.object({
filters_override: zod
.string()
.optional()
@@ -295,7 +295,7 @@ export const InsightsRetrieveQueryParams = /* @__PURE__ */ zod.object({
* initial() (auth + permissions + throttling) before returning the
* cached response, ensuring the request is authorized.
*/
-export const InsightsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const InsightsPartialUpdateParams = () => zod.object({
id: zod
.union([zod.number(), zod.string()])
.describe('Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight.'),
@@ -306,7 +306,7 @@ export const InsightsPartialUpdateParams = /* @__PURE__ */ zod.object({
),
})
-export const InsightsPartialUpdateQueryParams = /* @__PURE__ */ zod.object({
+export const InsightsPartialUpdateQueryParams = () => zod.object({
format: zod.enum(['csv', 'json']).optional(),
include_dashboards: zod
.boolean()
@@ -325,7 +325,7 @@ export const insightsPartialUpdateBodyOrderMax = 2147483647
export const insightsPartialUpdateBodyDescriptionMax = 400
-export const InsightsPartialUpdateBody = /* @__PURE__ */ zod
+export const InsightsPartialUpdateBody = () => zod
.object({
name: zod.string().max(insightsPartialUpdateBodyNameMax).nullish(),
derived_name: zod.string().max(insightsPartialUpdateBodyDerivedNameMax).nullish(),
@@ -347,7 +347,7 @@ export const InsightsPartialUpdateBody = /* @__PURE__ */ zod
/**
* Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
*/
-export const InsightsDestroyParams = /* @__PURE__ */ zod.object({
+export const InsightsDestroyParams = () => zod.object({
id: zod
.union([zod.number(), zod.string()])
.describe('Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight.'),
@@ -358,14 +358,14 @@ export const InsightsDestroyParams = /* @__PURE__ */ zod.object({
),
})
-export const InsightsDestroyQueryParams = /* @__PURE__ */ zod.object({
+export const InsightsDestroyQueryParams = () => zod.object({
format: zod.enum(['csv', 'json']).optional(),
})
/**
* Audit trail for a single insight — every change made to it, by whom, and when. Use this when you want the change history of a specific insight; use the project-wide activity endpoint for a broader view.
*/
-export const InsightsActivityRetrieveParams = /* @__PURE__ */ zod.object({
+export const InsightsActivityRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this insight.'),
project_id: zod
.string()
@@ -374,7 +374,7 @@ export const InsightsActivityRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const InsightsActivityRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const InsightsActivityRetrieveQueryParams = () => zod.object({
format: zod.enum(['csv', 'json']).optional(),
limit: zod.number().optional().describe('Page size. Defaults to 10.'),
page: zod.number().optional().describe('1-indexed page number. Defaults to 1.'),
@@ -383,7 +383,7 @@ export const InsightsActivityRetrieveQueryParams = /* @__PURE__ */ zod.object({
/**
* Project-wide audit trail across all insights — who created, edited, deleted, or restored insights, what changed (with before/after diffs), and when. Useful for surfacing what people (or agents) have been working on recently.
*/
-export const InsightsAllActivityRetrieveParams = /* @__PURE__ */ zod.object({
+export const InsightsAllActivityRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -391,7 +391,7 @@ export const InsightsAllActivityRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const InsightsAllActivityRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const InsightsAllActivityRetrieveQueryParams = () => zod.object({
format: zod.enum(['csv', 'json']).optional(),
limit: zod.number().optional().describe('Page size. Defaults to 10.'),
page: zod.number().optional().describe('1-indexed page number. Defaults to 1.'),
@@ -400,7 +400,7 @@ export const InsightsAllActivityRetrieveQueryParams = /* @__PURE__ */ zod.object
/**
* Returns insights ranked by view count over the last N days (default 7), highest first. Each result includes the same metadata as the standard insights list, plus a `view_count` and up to 3 recent `viewers`. Useful for surfacing the most-used insights in a project.
*/
-export const InsightsTrendingRetrieveParams = /* @__PURE__ */ zod.object({
+export const InsightsTrendingRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -408,7 +408,7 @@ export const InsightsTrendingRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const InsightsTrendingRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const InsightsTrendingRetrieveQueryParams = () => zod.object({
days: zod
.number()
.optional()
diff --git a/services/mcp/src/generated/proxy-records/api.ts b/services/mcp/src/generated/proxy-records/api.ts
index 88464ae9bc52..3360d4f97db5 100644
--- a/services/mcp/src/generated/proxy-records/api.ts
+++ b/services/mcp/src/generated/proxy-records/api.ts
@@ -11,7 +11,7 @@ import * as zod from 'zod'
/**
* List all reverse proxies configured for the organization. Returns proxy records along with the maximum number allowed by the current plan.
*/
-export const ProxyRecordsListParams = /* @__PURE__ */ zod.object({
+export const ProxyRecordsListParams = () => zod.object({
organization_id: zod
.string()
.describe(
@@ -22,7 +22,7 @@ export const ProxyRecordsListParams = /* @__PURE__ */ zod.object({
/**
* Create a new managed reverse proxy. Provide the domain you want to proxy through. The response includes the CNAME target you need to add as a DNS record. Once the CNAME is configured, the proxy will be automatically verified and provisioned.
*/
-export const ProxyRecordsCreateParams = /* @__PURE__ */ zod.object({
+export const ProxyRecordsCreateParams = () => zod.object({
organization_id: zod
.string()
.describe(
@@ -30,7 +30,7 @@ export const ProxyRecordsCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const ProxyRecordsCreateBody = /* @__PURE__ */ zod.object({
+export const ProxyRecordsCreateBody = () => zod.object({
domain: zod
.string()
.describe("The custom domain to proxy through, e.g. 'e.example.com'. Must be a valid subdomain you control."),
@@ -39,7 +39,7 @@ export const ProxyRecordsCreateBody = /* @__PURE__ */ zod.object({
/**
* Get details of a specific reverse proxy by ID. Returns the full configuration including domain, CNAME target, and current provisioning status.
*/
-export const ProxyRecordsRetrieveParams = /* @__PURE__ */ zod.object({
+export const ProxyRecordsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this proxy record.'),
organization_id: zod
.string()
@@ -51,7 +51,7 @@ export const ProxyRecordsRetrieveParams = /* @__PURE__ */ zod.object({
/**
* Delete a reverse proxy. For proxies in 'waiting', 'erroring', or 'timed_out' status, the record is deleted immediately. For active proxies, a deletion workflow is started to clean up the provisioned infrastructure.
*/
-export const ProxyRecordsDestroyParams = /* @__PURE__ */ zod.object({
+export const ProxyRecordsDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this proxy record.'),
organization_id: zod
.string()
@@ -63,7 +63,7 @@ export const ProxyRecordsDestroyParams = /* @__PURE__ */ zod.object({
/**
* Run a deep diagnostic on a reverse proxy. Inspects DNS CNAME alignment, the certificate provider's hostname state, CAA records walked up the customer's DNS tree, HTTP-01 challenge reachability, a live event probe, and certificate expiry. Returns a structured report with each check's status and concrete remediation steps (e.g. exact DNS records to add). Use this to debug why a proxy is stuck or erroring.
*/
-export const ProxyRecordsDiagnoseCreateParams = /* @__PURE__ */ zod.object({
+export const ProxyRecordsDiagnoseCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this proxy record.'),
organization_id: zod
.string()
@@ -75,7 +75,7 @@ export const ProxyRecordsDiagnoseCreateParams = /* @__PURE__ */ zod.object({
/**
* Retry provisioning a failed reverse proxy. Only available for proxies in 'erroring' or 'timed_out' status. Resets the proxy to 'waiting' status and restarts the provisioning workflow.
*/
-export const ProxyRecordsRetryCreateParams = /* @__PURE__ */ zod.object({
+export const ProxyRecordsRetryCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this proxy record.'),
organization_id: zod
.string()
diff --git a/services/mcp/src/generated/reminders/api.ts b/services/mcp/src/generated/reminders/api.ts
index f12d03fddcfd..2f48c4626af2 100644
--- a/services/mcp/src/generated/reminders/api.ts
+++ b/services/mcp/src/generated/reminders/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const RemindersListQueryParams = /* @__PURE__ */ zod.object({
+export const RemindersListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
@@ -23,7 +23,7 @@ export const remindersCreateBodyCronExpressionMax = 100
export const remindersCreateBodyTimezoneMax = 64
-export const RemindersCreateBody = /* @__PURE__ */ zod.object({
+export const RemindersCreateBody = () => zod.object({
organization: zod.string().describe('ID of the organization this reminder belongs to. You must be a member of it.'),
team: zod
.number()
@@ -84,11 +84,11 @@ export const RemindersCreateBody = /* @__PURE__ */ zod.object({
.describe('Optional: recurring reminders stop (status=completed) after this time.'),
})
-export const RemindersRetrieveParams = /* @__PURE__ */ zod.object({
+export const RemindersRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this reminder.'),
})
-export const RemindersPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const RemindersPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this reminder.'),
})
@@ -102,7 +102,7 @@ export const remindersPartialUpdateBodyCronExpressionMax = 100
export const remindersPartialUpdateBodyTimezoneMax = 64
-export const RemindersPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const RemindersPartialUpdateBody = () => zod.object({
organization: zod
.string()
.optional()
@@ -167,6 +167,6 @@ export const RemindersPartialUpdateBody = /* @__PURE__ */ zod.object({
.describe('Optional: recurring reminders stop (status=completed) after this time.'),
})
-export const RemindersDestroyParams = /* @__PURE__ */ zod.object({
+export const RemindersDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this reminder.'),
})
diff --git a/services/mcp/src/generated/replay/api.ts b/services/mcp/src/generated/replay/api.ts
index 2bcac8410751..22bdefcef2d7 100644
--- a/services/mcp/src/generated/replay/api.ts
+++ b/services/mcp/src/generated/replay/api.ts
@@ -17,7 +17,7 @@ import * as zod from 'zod'
* the input sizes are recorded as span attributes — a slow response on a team
* with many playlists then shows up as a wide span against a large db_count.
*/
-export const SessionRecordingPlaylistsListParams = /* @__PURE__ */ zod.object({
+export const SessionRecordingPlaylistsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -25,14 +25,14 @@ export const SessionRecordingPlaylistsListParams = /* @__PURE__ */ zod.object({
),
})
-export const SessionRecordingPlaylistsListQueryParams = /* @__PURE__ */ zod.object({
+export const SessionRecordingPlaylistsListQueryParams = () => zod.object({
created_by: zod.number().optional(),
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
short_id: zod.string().optional(),
})
-export const SessionRecordingPlaylistsCreateParams = /* @__PURE__ */ zod.object({
+export const SessionRecordingPlaylistsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -44,7 +44,7 @@ export const sessionRecordingPlaylistsCreateBodyNameMax = 400
export const sessionRecordingPlaylistsCreateBodyDerivedNameMax = 400
-export const SessionRecordingPlaylistsCreateBody = /* @__PURE__ */ zod.object({
+export const SessionRecordingPlaylistsCreateBody = () => zod.object({
name: zod
.string()
.max(sessionRecordingPlaylistsCreateBodyNameMax)
@@ -71,7 +71,7 @@ export const SessionRecordingPlaylistsCreateBody = /* @__PURE__ */ zod.object({
),
})
-export const SessionRecordingPlaylistsRetrieveParams = /* @__PURE__ */ zod.object({
+export const SessionRecordingPlaylistsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -80,7 +80,7 @@ export const SessionRecordingPlaylistsRetrieveParams = /* @__PURE__ */ zod.objec
short_id: zod.string(),
})
-export const SessionRecordingPlaylistsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const SessionRecordingPlaylistsPartialUpdateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -93,7 +93,7 @@ export const sessionRecordingPlaylistsPartialUpdateBodyNameMax = 400
export const sessionRecordingPlaylistsPartialUpdateBodyDerivedNameMax = 400
-export const SessionRecordingPlaylistsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const SessionRecordingPlaylistsPartialUpdateBody = () => zod.object({
name: zod
.string()
.max(sessionRecordingPlaylistsPartialUpdateBodyNameMax)
@@ -111,7 +111,7 @@ export const SessionRecordingPlaylistsPartialUpdateBody = /* @__PURE__ */ zod.ob
),
})
-export const SessionRecordingsRetrieveParams = /* @__PURE__ */ zod.object({
+export const SessionRecordingsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this session recording.'),
project_id: zod
.string()
@@ -120,7 +120,7 @@ export const SessionRecordingsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const SessionRecordingsDestroyParams = /* @__PURE__ */ zod.object({
+export const SessionRecordingsDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this session recording.'),
project_id: zod
.string()
@@ -132,7 +132,7 @@ export const SessionRecordingsDestroyParams = /* @__PURE__ */ zod.object({
/**
* Delete a batch of session recordings by session ID. Deletion is permanent and cannot be undone. IDs that don't match an existing recording are skipped and counted in `total_requested` but not `deleted_count`.
*/
-export const SessionRecordingsBulkDeleteCreateParams = /* @__PURE__ */ zod.object({
+export const SessionRecordingsBulkDeleteCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -142,7 +142,7 @@ export const SessionRecordingsBulkDeleteCreateParams = /* @__PURE__ */ zod.objec
export const sessionRecordingsBulkDeleteCreateBodySessionRecordingIdsMax = 100
-export const SessionRecordingsBulkDeleteCreateBody = /* @__PURE__ */ zod.object({
+export const SessionRecordingsBulkDeleteCreateBody = () => zod.object({
session_recording_ids: zod
.array(zod.string())
.min(1)
diff --git a/services/mcp/src/generated/replay_vision/api.ts b/services/mcp/src/generated/replay_vision/api.ts
index 1f42671be4a7..b623a31f3030 100644
--- a/services/mcp/src/generated/replay_vision/api.ts
+++ b/services/mcp/src/generated/replay_vision/api.ts
@@ -16,7 +16,7 @@ import * as zod from 'zod'
* response contract stays exactly as documented here, but nothing reads or writes VisionAction
* rows anymore. The runs endpoints keep serving the pre-migration run history.
*/
-export const VisionActionsListParams = /* @__PURE__ */ zod.object({
+export const VisionActionsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -24,7 +24,7 @@ export const VisionActionsListParams = /* @__PURE__ */ zod.object({
),
})
-export const VisionActionsListQueryParams = /* @__PURE__ */ zod.object({
+export const VisionActionsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
scanner: zod.string().optional().describe('Filter to the actions belonging to one scanner.'),
@@ -38,7 +38,7 @@ export const VisionActionsListQueryParams = /* @__PURE__ */ zod.object({
* response contract stays exactly as documented here, but nothing reads or writes VisionAction
* rows anymore. The runs endpoints keep serving the pre-migration run history.
*/
-export const VisionActionsCreateParams = /* @__PURE__ */ zod.object({
+export const VisionActionsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -56,7 +56,7 @@ export const visionActionsCreateBodyAlertConfigOneMetricDefault = `count`
export const visionActionsCreateBodyAlertConfigOneDirectionDefault = `above`
export const visionActionsCreateBodyAlertConfigOneIncludeReasoningDefault = false
-export const VisionActionsCreateBody = /* @__PURE__ */ zod
+export const VisionActionsCreateBody = () => zod
.object({
name: zod
.string()
@@ -237,7 +237,7 @@ export const VisionActionsCreateBody = /* @__PURE__ */ zod
* response contract stays exactly as documented here, but nothing reads or writes VisionAction
* rows anymore. The runs endpoints keep serving the pre-migration run history.
*/
-export const VisionActionsRetrieveParams = /* @__PURE__ */ zod.object({
+export const VisionActionsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this vision action.'),
project_id: zod
.string()
@@ -254,7 +254,7 @@ export const VisionActionsRetrieveParams = /* @__PURE__ */ zod.object({
* response contract stays exactly as documented here, but nothing reads or writes VisionAction
* rows anymore. The runs endpoints keep serving the pre-migration run history.
*/
-export const VisionActionsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const VisionActionsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this vision action.'),
project_id: zod
.string()
@@ -273,7 +273,7 @@ export const visionActionsPartialUpdateBodyAlertConfigOneMetricDefault = `count`
export const visionActionsPartialUpdateBodyAlertConfigOneDirectionDefault = `above`
export const visionActionsPartialUpdateBodyAlertConfigOneIncludeReasoningDefault = false
-export const VisionActionsPartialUpdateBody = /* @__PURE__ */ zod
+export const VisionActionsPartialUpdateBody = () => zod
.object({
name: zod
.string()
@@ -456,7 +456,7 @@ export const VisionActionsPartialUpdateBody = /* @__PURE__ */ zod
* response contract stays exactly as documented here, but nothing reads or writes VisionAction
* rows anymore. The runs endpoints keep serving the pre-migration run history.
*/
-export const VisionActionsDestroyParams = /* @__PURE__ */ zod.object({
+export const VisionActionsDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this vision action.'),
project_id: zod
.string()
@@ -468,7 +468,7 @@ export const VisionActionsDestroyParams = /* @__PURE__ */ zod.object({
/**
* Read-only run history for a single vision action (nested under /vision/actions/{action_id}/runs/).
*/
-export const VisionActionsRunsListParams = /* @__PURE__ */ zod.object({
+export const VisionActionsRunsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -477,7 +477,7 @@ export const VisionActionsRunsListParams = /* @__PURE__ */ zod.object({
vision_action_id: zod.string(),
})
-export const VisionActionsRunsListQueryParams = /* @__PURE__ */ zod.object({
+export const VisionActionsRunsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
@@ -485,7 +485,7 @@ export const VisionActionsRunsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Read-only run history for a single vision action (nested under /vision/actions/{action_id}/runs/).
*/
-export const VisionActionsRunsRetrieveParams = /* @__PURE__ */ zod.object({
+export const VisionActionsRunsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this vision action run.'),
project_id: zod
.string()
@@ -499,7 +499,7 @@ export const VisionActionsRunsRetrieveParams = /* @__PURE__ */ zod.object({
* A session's observations across every scanner the caller can read, plus the team-level semantic
* `search` action, which resolves its own scanner scope instead of this queryset.
*/
-export const VisionObservationsListParams = /* @__PURE__ */ zod.object({
+export const VisionObservationsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -507,7 +507,7 @@ export const VisionObservationsListParams = /* @__PURE__ */ zod.object({
),
})
-export const VisionObservationsListQueryParams = /* @__PURE__ */ zod.object({
+export const VisionObservationsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
order_by: zod
@@ -522,7 +522,7 @@ export const VisionObservationsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Retrieve one observation. Any list filters passed along (status, tags, order_by, …) scope the `previous_observation_id`/`next_observation_id` navigation to the matching, identically-ordered set — so prev/next from a filtered table stays within that filtered list.
*/
-export const VisionObservationsRetrieveParams = /* @__PURE__ */ zod.object({
+export const VisionObservationsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this replay observation.'),
project_id: zod
.string()
@@ -531,7 +531,7 @@ export const VisionObservationsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const VisionObservationsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const VisionObservationsRetrieveQueryParams = () => zod.object({
backfill_id: zod.string().optional().describe('Only observations dispatched by this backfill.'),
date_from: zod
.string()
@@ -599,7 +599,7 @@ export const VisionObservationsRetrieveQueryParams = /* @__PURE__ */ zod.object(
/**
* Set or update the observation's shared label: whether the scanner scored the session correctly, plus optional feedback on what it got wrong. One label per observation, shared across the team; these labels feed prompt improvement. Requires editor access to the scanner.
*/
-export const VisionObservationsLabelCreateParams = /* @__PURE__ */ zod.object({
+export const VisionObservationsLabelCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this replay observation.'),
project_id: zod
.string()
@@ -611,7 +611,7 @@ export const VisionObservationsLabelCreateParams = /* @__PURE__ */ zod.object({
export const visionObservationsLabelCreateBodyFeedbackDefault = ``
export const visionObservationsLabelCreateBodyFeedbackMax = 5000
-export const VisionObservationsLabelCreateBody = /* @__PURE__ */ zod
+export const VisionObservationsLabelCreateBody = () => zod
.object({
is_correct: zod.boolean().describe('True if the scanner scored this session correctly, false if not.'),
feedback: zod
@@ -627,7 +627,7 @@ export const VisionObservationsLabelCreateBody = /* @__PURE__ */ zod
/**
* Remove the observation's shared label. Requires editor access to the scanner.
*/
-export const VisionObservationsLabelDestroyParams = /* @__PURE__ */ zod.object({
+export const VisionObservationsLabelDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this replay observation.'),
project_id: zod
.string()
@@ -640,7 +640,7 @@ export const VisionObservationsLabelDestroyParams = /* @__PURE__ */ zod.object({
* Rank observations by semantic similarity to the search text, optionally filtered by exact outcome
* (verdict, score, tags).
*/
-export const VisionObservationsSearchRetrieveParams = /* @__PURE__ */ zod.object({
+export const VisionObservationsSearchRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -653,7 +653,7 @@ export const visionObservationsSearchRetrieveQueryLimitMax = 50
export const visionObservationsSearchRetrieveQueryQMax = 2000
-export const VisionObservationsSearchRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const VisionObservationsSearchRetrieveQueryParams = () => zod.object({
limit: zod
.number()
.min(1)
@@ -685,7 +685,7 @@ export const VisionObservationsSearchRetrieveQueryParams = /* @__PURE__ */ zod.o
.describe('Comma-separated monitor verdicts to keep, e.g. `yes,inconclusive`.'),
})
-export const EnvironmentVisionQuotaRetrieveParams = /* @__PURE__ */ zod.object({
+export const EnvironmentVisionQuotaRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -696,7 +696,7 @@ export const EnvironmentVisionQuotaRetrieveParams = /* @__PURE__ */ zod.object({
/**
* CRUD for Replay Vision scanners.
*/
-export const VisionScannersListParams = /* @__PURE__ */ zod.object({
+export const VisionScannersListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -704,7 +704,7 @@ export const VisionScannersListParams = /* @__PURE__ */ zod.object({
),
})
-export const VisionScannersListQueryParams = /* @__PURE__ */ zod.object({
+export const VisionScannersListQueryParams = () => zod.object({
created_by: zod.string().optional().describe('Filter to scanners created by the given user IDs (comma-separated).'),
emits_signals: zod.boolean().optional().describe('Filter to scanners that emit Signals.'),
enabled: zod
@@ -737,7 +737,7 @@ export const VisionScannersListQueryParams = /* @__PURE__ */ zod.object({
/**
* CRUD for Replay Vision scanners.
*/
-export const VisionScannersCreateParams = /* @__PURE__ */ zod.object({
+export const VisionScannersCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -760,7 +760,7 @@ export const visionScannersCreateBodyCreditLimitMax = 2147483647
export const visionScannersCreateBodyExperimentTargetingOneVariantMax = 400
-export const VisionScannersCreateBody = /* @__PURE__ */ zod
+export const VisionScannersCreateBody = () => zod
.object({
name: zod
.string()
@@ -874,7 +874,7 @@ export const VisionScannersCreateBody = /* @__PURE__ */ zod
/**
* CRUD for Replay Vision scanners.
*/
-export const VisionScannersRetrieveParams = /* @__PURE__ */ zod.object({
+export const VisionScannersRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this replay scanner.'),
project_id: zod
.string()
@@ -886,7 +886,7 @@ export const VisionScannersRetrieveParams = /* @__PURE__ */ zod.object({
/**
* CRUD for Replay Vision scanners.
*/
-export const VisionScannersPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const VisionScannersPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this replay scanner.'),
project_id: zod
.string()
@@ -910,7 +910,7 @@ export const visionScannersPartialUpdateBodyCreditLimitMax = 2147483647
export const visionScannersPartialUpdateBodyExperimentTargetingOneVariantMax = 400
-export const VisionScannersPartialUpdateBody = /* @__PURE__ */ zod
+export const VisionScannersPartialUpdateBody = () => zod
.object({
name: zod
.string()
@@ -1028,7 +1028,7 @@ export const VisionScannersPartialUpdateBody = /* @__PURE__ */ zod
/**
* CRUD for Replay Vision scanners.
*/
-export const VisionScannersDestroyParams = /* @__PURE__ */ zod.object({
+export const VisionScannersDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this replay scanner.'),
project_id: zod
.string()
@@ -1040,7 +1040,7 @@ export const VisionScannersDestroyParams = /* @__PURE__ */ zod.object({
/**
* Save the users this scanner matched as a static cohort, for surveys, funnels, and retention analysis.
*/
-export const VisionScannersAffectedCohortCreateParams = /* @__PURE__ */ zod.object({
+export const VisionScannersAffectedCohortCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this replay scanner.'),
project_id: zod
.string()
@@ -1054,7 +1054,7 @@ export const visionScannersAffectedCohortCreateBodyWindowDaysMax = 90
export const visionScannersAffectedCohortCreateBodyTagMax = 100
-export const VisionScannersAffectedCohortCreateBody = /* @__PURE__ */ zod
+export const VisionScannersAffectedCohortCreateBody = () => zod
.object({
window_days: zod
.number()
@@ -1085,7 +1085,7 @@ export const VisionScannersAffectedCohortCreateBody = /* @__PURE__ */ zod
/**
* Affected sessions and users for this scanner over the trailing window.
*/
-export const VisionScannersImpactRetrieveParams = /* @__PURE__ */ zod.object({
+export const VisionScannersImpactRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this replay scanner.'),
project_id: zod
.string()
@@ -1099,7 +1099,7 @@ export const visionScannersImpactRetrieveQueryTagMax = 100
export const visionScannersImpactRetrieveQueryWindowDaysDefault = 30
export const visionScannersImpactRetrieveQueryWindowDaysMax = 90
-export const VisionScannersImpactRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const VisionScannersImpactRetrieveQueryParams = () => zod.object({
max_score: zod.number().nullish().describe('Scorer scanners only: count sessions scoring at or below this value.'),
min_score: zod
.number()
@@ -1125,7 +1125,7 @@ export const VisionScannersImpactRetrieveQueryParams = /* @__PURE__ */ zod.objec
/**
* Apply this scanner to one specific session, on demand. Returns 202 with the workflow handle.
*/
-export const VisionScannersObserveCreateParams = /* @__PURE__ */ zod.object({
+export const VisionScannersObserveCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this replay scanner.'),
project_id: zod
.string()
@@ -1136,7 +1136,7 @@ export const VisionScannersObserveCreateParams = /* @__PURE__ */ zod.object({
export const visionScannersObserveCreateBodySessionIdMax = 128
-export const VisionScannersObserveCreateBody = /* @__PURE__ */ zod
+export const VisionScannersObserveCreateBody = () => zod
.object({
session_id: zod
.string()
@@ -1148,7 +1148,7 @@ export const VisionScannersObserveCreateBody = /* @__PURE__ */ zod
/**
* Read-only access to observations produced by a scanner.
*/
-export const VisionScannersObservationsListParams = /* @__PURE__ */ zod.object({
+export const VisionScannersObservationsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1157,7 +1157,7 @@ export const VisionScannersObservationsListParams = /* @__PURE__ */ zod.object({
scanner_id: zod.string(),
})
-export const VisionScannersObservationsListQueryParams = /* @__PURE__ */ zod.object({
+export const VisionScannersObservationsListQueryParams = () => zod.object({
backfill_id: zod.string().optional().describe('Only observations dispatched by this backfill.'),
date_from: zod
.string()
@@ -1227,7 +1227,7 @@ export const VisionScannersObservationsListQueryParams = /* @__PURE__ */ zod.obj
/**
* Retrieve one observation. Any list filters passed along (status, tags, order_by, …) scope the `previous_observation_id`/`next_observation_id` navigation to the matching, identically-ordered set — so prev/next from a filtered table stays within that filtered list.
*/
-export const VisionScannersObservationsRetrieveParams = /* @__PURE__ */ zod.object({
+export const VisionScannersObservationsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this replay observation.'),
project_id: zod
.string()
@@ -1237,7 +1237,7 @@ export const VisionScannersObservationsRetrieveParams = /* @__PURE__ */ zod.obje
scanner_id: zod.string(),
})
-export const VisionScannersObservationsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const VisionScannersObservationsRetrieveQueryParams = () => zod.object({
backfill_id: zod.string().optional().describe('Only observations dispatched by this backfill.'),
date_from: zod
.string()
@@ -1305,7 +1305,7 @@ export const VisionScannersObservationsRetrieveQueryParams = /* @__PURE__ */ zod
/**
* Aggregate counts and per-scanner-type distributions over the filtered observation set. Same filters as the list endpoint apply.
*/
-export const VisionScannersObservationsStatsRetrieveParams = /* @__PURE__ */ zod.object({
+export const VisionScannersObservationsStatsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1314,7 +1314,7 @@ export const VisionScannersObservationsStatsRetrieveParams = /* @__PURE__ */ zod
scanner_id: zod.string(),
})
-export const VisionScannersObservationsStatsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const VisionScannersObservationsStatsRetrieveQueryParams = () => zod.object({
backfill_id: zod.string().optional().describe('Only observations dispatched by this backfill.'),
date_from: zod
.string()
@@ -1382,7 +1382,7 @@ export const VisionScannersObservationsStatsRetrieveQueryParams = /* @__PURE__ *
/**
* Apply this suggestion: write a config to the scanner (the prompt plus any type-specific config such as classifier tags or the monitor allow_inconclusive flag), bumping the scanner version, and mark the suggestion applied. Pass `config` to apply an edited subset of the recommendation; omit it to apply the full suggested config. Only the current pending suggestion can be applied. Requires session recording edit access.
*/
-export const VisionScannersPromptSuggestionsApplyCreateParams = /* @__PURE__ */ zod.object({
+export const VisionScannersPromptSuggestionsApplyCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this replay scanner prompt suggestion.'),
project_id: zod
.string()
@@ -1392,7 +1392,7 @@ export const VisionScannersPromptSuggestionsApplyCreateParams = /* @__PURE__ */
scanner_id: zod.string(),
})
-export const VisionScannersPromptSuggestionsApplyCreateBody = /* @__PURE__ */ zod.object({
+export const VisionScannersPromptSuggestionsApplyCreateBody = () => zod.object({
config: zod
.unknown()
.optional()
@@ -1404,7 +1404,7 @@ export const VisionScannersPromptSuggestionsApplyCreateBody = /* @__PURE__ */ zo
/**
* Dismiss this suggestion without applying it. Only the current pending suggestion can be dismissed. Requires editor access to the scanner.
*/
-export const VisionScannersPromptSuggestionsDismissCreateParams = /* @__PURE__ */ zod.object({
+export const VisionScannersPromptSuggestionsDismissCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this replay scanner prompt suggestion.'),
project_id: zod
.string()
@@ -1417,7 +1417,7 @@ export const VisionScannersPromptSuggestionsDismissCreateParams = /* @__PURE__ *
/**
* The scanner's newest prompt suggestion plus whether it is stale (the ratings changed since it was generated) and how many rated observations are available.
*/
-export const VisionScannersPromptSuggestionsCurrentRetrieveParams = /* @__PURE__ */ zod.object({
+export const VisionScannersPromptSuggestionsCurrentRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1429,7 +1429,7 @@ export const VisionScannersPromptSuggestionsCurrentRetrieveParams = /* @__PURE__
/**
* Generate a fresh prompt suggestion from the team's current ratings. The previous pending suggestion becomes history (superseded). Requires at least one rated observation and editor access to the scanner.
*/
-export const VisionScannersPromptSuggestionsGenerateCreateParams = /* @__PURE__ */ zod.object({
+export const VisionScannersPromptSuggestionsGenerateCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1441,7 +1441,7 @@ export const VisionScannersPromptSuggestionsGenerateCreateParams = /* @__PURE__
/**
* Estimate the observation volume a proposed scanner would generate, for the pre-save cost preview.
*/
-export const VisionScannersEstimateCreateParams = /* @__PURE__ */ zod.object({
+export const VisionScannersEstimateCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1457,7 +1457,7 @@ export const visionScannersEstimateCreateBodySamplingModeDefault = `comprehensiv
export const visionScannersEstimateCreateBodyModelDefault = `gemini-3-flash-preview`
export const visionScannersEstimateCreateBodyExperimentTargetingOneVariantMax = 400
-export const VisionScannersEstimateCreateBody = /* @__PURE__ */ zod
+export const VisionScannersEstimateCreateBody = () => zod
.object({
query: zod
.unknown()
@@ -1525,7 +1525,7 @@ export const VisionScannersEstimateCreateBody = /* @__PURE__ */ zod
* The config resolves to a scanner minted on first use, so asking the same question twice reuses
* the observations it already has, while a different question about the same session gets its own.
*/
-export const VisionScannersInlineScanCreateParams = /* @__PURE__ */ zod.object({
+export const VisionScannersInlineScanCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1542,7 +1542,7 @@ export const visionScannersInlineScanCreateBodyPromptMax = 20000
export const visionScannersInlineScanCreateBodyScannerTypeDefault = `monitor`
export const visionScannersInlineScanCreateBodyModelDefault = `gemini-3-flash-preview`
-export const VisionScannersInlineScanCreateBody = /* @__PURE__ */ zod
+export const VisionScannersInlineScanCreateBody = () => zod
.object({
session_ids: zod
.array(zod.string().max(visionScannersInlineScanCreateBodySessionIdsItemMax))
diff --git a/services/mcp/src/generated/review_hog/api.ts b/services/mcp/src/generated/review_hog/api.ts
index c1b420ad9a85..09b29a865faa 100644
--- a/services/mcp/src/generated/review_hog/api.ts
+++ b/services/mcp/src/generated/review_hog/api.ts
@@ -12,7 +12,7 @@ import * as zod from 'zod'
* Recent ReviewHog reviews on this project: actively running reviews first (with the in-flight turn's stage), then the most recent completed ones — at most `limit` rows (default 5), plus `has_more` for whether a larger `limit` would reveal more. By default only the requesting user's reviews; `scope=everyone` lists every review on the project.
* @summary List recent reviews
*/
-export const ReviewHogReviewsListParams = /* @__PURE__ */ zod.object({
+export const ReviewHogReviewsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -25,7 +25,7 @@ export const reviewHogReviewsListQueryLimitMax = 100
export const reviewHogReviewsListQueryScopeDefault = `mine`
-export const ReviewHogReviewsListQueryParams = /* @__PURE__ */ zod.object({
+export const ReviewHogReviewsListQueryParams = () => zod.object({
limit: zod
.number()
.min(1)
@@ -46,7 +46,7 @@ export const ReviewHogReviewsListQueryParams = /* @__PURE__ */ zod.object({
* One completed ReviewHog review on this project, with the latest turn's validated findings, the findings the validator dismissed (and why), and the review body published to GitHub. Project-wide, so reviews listed under `scope=everyone` can be opened too.
* @summary Retrieve one review's detail
*/
-export const ReviewHogReviewsRetrieveParams = /* @__PURE__ */ zod.object({
+export const ReviewHogReviewsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this review report.'),
project_id: zod
.string()
@@ -59,7 +59,7 @@ export const ReviewHogReviewsRetrieveParams = /* @__PURE__ */ zod.object({
* Start a ReviewHog review of any pull request the project's GitHub App installation can access, and publish it back to the PR. The requesting user is the review's acting user: their enabled perspectives, blind-spot check, validator, urgency threshold, and resolution criteria drive the run, and it appears under their recent reviews. `run_mode` picks the variant: a review (which chains the resolution stage per the user's resolve_comments setting), a review without resolving, or resolution only. Nonexistent, closed, and fork PRs are rejected synchronously; a PR whose current commit already has a published review returns 'already_reviewed' without starting a run (resolve_only skips that check — settling threads on a reviewed head is its whole point), and triggering a PR whose run is currently in flight joins that run. Otherwise non-blocking: returns the Temporal workflow id immediately while the run executes in the worker.
* @summary Start a review of a pull request
*/
-export const ReviewHogReviewsTriggerCreateParams = /* @__PURE__ */ zod.object({
+export const ReviewHogReviewsTriggerCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -69,7 +69,7 @@ export const ReviewHogReviewsTriggerCreateParams = /* @__PURE__ */ zod.object({
export const reviewHogReviewsTriggerCreateBodyRunModeDefault = `review`
-export const ReviewHogReviewsTriggerCreateBody = /* @__PURE__ */ zod.object({
+export const ReviewHogReviewsTriggerCreateBody = () => zod.object({
pr_url: zod
.string()
.describe(
diff --git a/services/mcp/src/generated/signals/api.ts b/services/mcp/src/generated/signals/api.ts
index 7cad3a86a8b7..e369838bf846 100644
--- a/services/mcp/src/generated/signals/api.ts
+++ b/services/mcp/src/generated/signals/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const SignalsReportsListParams = /* @__PURE__ */ zod.object({
+export const SignalsReportsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,7 +16,7 @@ export const SignalsReportsListParams = /* @__PURE__ */ zod.object({
),
})
-export const SignalsReportsListQueryParams = /* @__PURE__ */ zod.object({
+export const SignalsReportsListQueryParams = () => zod.object({
channel_id: zod
.string()
.optional()
@@ -98,7 +98,7 @@ export const SignalsReportsListQueryParams = /* @__PURE__ */ zod.object({
.describe("Only reports associated with this task (via the report's task associations)."),
})
-export const SignalsReportsRetrieveParams = /* @__PURE__ */ zod.object({
+export const SignalsReportsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this signal report.'),
project_id: zod
.string()
@@ -111,7 +111,7 @@ export const SignalsReportsRetrieveParams = /* @__PURE__ */ zod.object({
* Edit the human-facing title and/or summary (description) of a signal report, addressed by id. Both fields are optional — supply only the ones you want to change; at least one is required. Every other report field (status, weights, judgments) is managed by the signals pipeline and cannot be set here. Returns the full updated report.
* @summary Edit a report's title or summary
*/
-export const SignalsReportsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const SignalsReportsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this signal report.'),
project_id: zod
.string()
@@ -124,7 +124,7 @@ export const signalsReportsPartialUpdateBodyTitleMax = 300
export const signalsReportsPartialUpdateBodySummaryMax = 10000
-export const SignalsReportsPartialUpdateBody = /* @__PURE__ */ zod
+export const SignalsReportsPartialUpdateBody = () => zod
.object({
title: zod
.string()
@@ -165,7 +165,7 @@ export const SignalsReportsPartialUpdateBody = /* @__PURE__ */ zod
* "snooze_for": <number of additional signals before re-promotion>,
* }
*/
-export const SignalsReportsStateCreateParams = /* @__PURE__ */ zod.object({
+export const SignalsReportsStateCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this signal report.'),
project_id: zod
.string()
@@ -180,7 +180,7 @@ export const signalsReportsStateCreateBodyCorrectedRepositoryMax = 140
export const signalsReportsStateCreateBodySnoozeForMax = 100000
-export const SignalsReportsStateCreateBody = /* @__PURE__ */ zod.object({
+export const SignalsReportsStateCreateBody = () => zod.object({
state: zod
.enum(['suppressed', 'potential', 'resolved'])
.describe('\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved')
@@ -233,7 +233,7 @@ export const SignalsReportsStateCreateBody = /* @__PURE__ */ zod.object({
* List every artefact on a report — the full work log: signal findings (the evidence behind the report), status judgments (safety / actionability / priority, repo selection, suggested reviewers — the newest row of each status type is canonical), and log entries (code references, commits, task runs, notes). `suggested_reviewers` content is enriched with PostHog user info at read time.
* @summary List a report's artefacts
*/
-export const SignalsReportArtefactsListParams = /* @__PURE__ */ zod.object({
+export const SignalsReportArtefactsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -246,7 +246,7 @@ export const SignalsReportArtefactsListParams = /* @__PURE__ */ zod.object({
),
})
-export const SignalsReportArtefactsListQueryParams = /* @__PURE__ */ zod.object({
+export const SignalsReportArtefactsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
@@ -255,7 +255,7 @@ export const SignalsReportArtefactsListQueryParams = /* @__PURE__ */ zod.object(
* Append an artefact to a report (see artefact_type for the writable types). Everything is append-only: log entries (code reference, commit, task run, note) accumulate, while status types (safety / actionability / priority judgments, repo selection, suggested reviewers, channel assignments) are latest-wins — appending a new version supersedes the previous one as the report's canonical status. Content is validated against the type's schema.
* @summary Append an artefact to a report
*/
-export const SignalsReportArtefactsCreateParams = /* @__PURE__ */ zod.object({
+export const SignalsReportArtefactsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -268,7 +268,7 @@ export const SignalsReportArtefactsCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const SignalsReportArtefactsCreateHeader = /* @__PURE__ */ zod.object({
+export const SignalsReportArtefactsCreateHeader = () => zod.object({
'X-PostHog-Task-Id': zod
.string()
.optional()
@@ -277,7 +277,7 @@ export const SignalsReportArtefactsCreateHeader = /* @__PURE__ */ zod.object({
),
})
-export const SignalsReportArtefactsCreateBody = /* @__PURE__ */ zod
+export const SignalsReportArtefactsCreateBody = () => zod
.object({
artefact_type: zod
.string()
@@ -298,7 +298,7 @@ export const SignalsReportArtefactsCreateBody = /* @__PURE__ */ zod
* Get one artefact by id, content parsed (and reviewers enriched) the same way as the list.
* @summary Get a single artefact
*/
-export const SignalsReportArtefactsRetrieveParams = /* @__PURE__ */ zod.object({
+export const SignalsReportArtefactsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this signal report artefact.'),
project_id: zod
.string()
@@ -316,7 +316,7 @@ export const SignalsReportArtefactsRetrieveParams = /* @__PURE__ */ zod.object({
* Replace the content of an existing artefact, addressed by id. The new content is validated against the artefact's type schema. Editing the latest row of a status type changes the report's canonical status (latest-wins); to re-assess while keeping history, append a new artefact instead. Attribution is creation-time only — edits don't reassign it.
* @summary Replace an artefact's content
*/
-export const SignalsReportArtefactsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const SignalsReportArtefactsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this signal report artefact.'),
project_id: zod
.string()
@@ -330,7 +330,7 @@ export const SignalsReportArtefactsPartialUpdateParams = /* @__PURE__ */ zod.obj
),
})
-export const SignalsReportArtefactsPartialUpdateBody = /* @__PURE__ */ zod
+export const SignalsReportArtefactsPartialUpdateBody = () => zod
.object({
content: zod
.unknown()
@@ -345,7 +345,7 @@ export const SignalsReportArtefactsPartialUpdateBody = /* @__PURE__ */ zod
* Delete an artefact, addressed by id. Deleting the latest row of a status type reverts the report's canonical status to the previous version (latest-wins over what remains). `task_run` artefacts are an append-only work log and cannot be deleted.
* @summary Delete an artefact
*/
-export const SignalsReportArtefactsDestroyParams = /* @__PURE__ */ zod.object({
+export const SignalsReportArtefactsDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this signal report artefact.'),
project_id: zod
.string()
@@ -368,7 +368,7 @@ export const SignalsReportArtefactsDestroyParams = /* @__PURE__ */ zod.object({
* de-duplication) plus per-outcome counts. The whole call is 200 even on partial failure —
* inspect `results` / the counts to see what happened.
*/
-export const SignalsReportsBulkStateCreateParams = /* @__PURE__ */ zod.object({
+export const SignalsReportsBulkStateCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -384,7 +384,7 @@ export const signalsReportsBulkStateCreateBodySnoozeForMax = 100000
export const signalsReportsBulkStateCreateBodyIdsMax = 100
-export const SignalsReportsBulkStateCreateBody = /* @__PURE__ */ zod.object({
+export const SignalsReportsBulkStateCreateBody = () => zod.object({
state: zod
.enum(['suppressed', 'potential', 'resolved'])
.describe('\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved')
@@ -443,7 +443,7 @@ export const SignalsReportsBulkStateCreateBody = /* @__PURE__ */ zod.object({
* Create a `signals-scout-*` skill and its runnable config atomically. The skill always receives the report-channel tools. The optional config controls schedule, enablement, dry-run posture, network access, and typed destinations such as Slack. Repeating the same definition is safe and applies any supplied config fields; reusing its name for a different definition returns 409.
* @summary Create a scout
*/
-export const SignalsScoutCreateParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -481,7 +481,7 @@ export const signalsScoutCreateBodyConfigOneTagsMax = 10
export const signalsScoutCreateBodyConfigOneMcpGatewayServerIdsMax = 100
-export const SignalsScoutCreateBody = /* @__PURE__ */ zod
+export const SignalsScoutCreateBody = () => zod
.object({
name: zod
.string()
@@ -663,7 +663,7 @@ export const SignalsScoutCreateBody = /* @__PURE__ */ zod
* List the per-(team, skill) scout configs for this project. Each row includes its schedule (rolling `run_interval_minutes`, or a project-local `run_cron_schedule` when set), `enabled`, `emit` posture, and `tags`. A freshly authored scout skill appears here once its config is registered, either explicitly via create or by the coordinator's next tick. Pass `tags` to narrow the fleet to the scouts carrying at least one of the given labels.
* @summary List scout configs
*/
-export const SignalsScoutConfigListParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutConfigListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -671,7 +671,7 @@ export const SignalsScoutConfigListParams = /* @__PURE__ */ zod.object({
),
})
-export const SignalsScoutConfigListQueryParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutConfigListQueryParams = () => zod.object({
tags: zod
.string()
.min(1)
@@ -685,7 +685,7 @@ export const SignalsScoutConfigListQueryParams = /* @__PURE__ */ zod.object({
* Register the config for a `signals-scout-*` skill immediately, without waiting for the coordinator to auto-register it. The same call can optionally set `run_interval_minutes`, a cron `run_cron_schedule`, `enabled`, `emit`, `network_access`, and output destinations. The skill must already exist on this project. Upsert: if a config already exists for the skill, the provided fields are applied to it.
* @summary Create a scout config
*/
-export const SignalsScoutConfigCreateParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutConfigCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -716,7 +716,7 @@ export const signalsScoutConfigCreateBodyMcpGatewayServerIdsMax = 100
export const signalsScoutConfigCreateBodySkillNameMax = 200
-export const SignalsScoutConfigCreateBody = /* @__PURE__ */ zod
+export const SignalsScoutConfigCreateBody = () => zod
.object({
enabled: zod.boolean().optional().describe('Whether this scout runs on its schedule. Defaults to true.'),
emit: zod
@@ -855,7 +855,7 @@ export const SignalsScoutConfigCreateBody = /* @__PURE__ */ zod
* Tune one scout: change its schedule (rolling `run_interval_minutes`, or a cron `run_cron_schedule` that takes precedence when set), `enabled`, `emit` (dry-run) posture, `network_access` (trusted-domain allowlist vs full access for the scout's sandbox), or output destinations. `skill_name` is fixed. Enabling records `enabled_by` and is activity-logged since it drives spend.
* @summary Update a scout config
*/
-export const SignalsScoutConfigUpdateParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutConfigUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this Signal scout config.'),
project_id: zod
.string()
@@ -885,7 +885,7 @@ export const signalsScoutConfigUpdateBodyTagsMax = 10
export const signalsScoutConfigUpdateBodyMcpGatewayServerIdsMax = 100
-export const SignalsScoutConfigUpdateBody = /* @__PURE__ */ zod
+export const SignalsScoutConfigUpdateBody = () => zod
.object({
enabled: zod
.boolean()
@@ -1023,7 +1023,7 @@ export const SignalsScoutConfigUpdateBody = /* @__PURE__ */ zod
* Delete one scout config by its `id`, removing the per-(team, skill) schedule/emit row outright. The point is cleaning up an orphaned config whose `signals-scout-*` skill was archived or deleted — it lingers in `list` with an empty `description`, never runs (the coordinator skips it and the skill can't load), but can't otherwise be removed over the API. Deletion is activity-logged. Note: if the skill still exists, the coordinator re-creates a default-schedule config on its next tick — to retire a live scout, archive its skill (or set `enabled=false` to make it inert) rather than deleting the config.
* @summary Delete a scout config
*/
-export const SignalsScoutConfigDestroyParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutConfigDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this Signal scout config.'),
project_id: zod
.string()
@@ -1036,7 +1036,7 @@ export const SignalsScoutConfigDestroyParams = /* @__PURE__ */ zod.object({
* Dispatch one on-demand run of this scout immediately, regardless of its schedule. Useful to test a scout right after authoring it, or to refresh its findings on demand. The run executes asynchronously on the worker and inherits every guard the scheduled path has: it is forbidden if scouts are not enabled for the project (403), and skipped if the project is over its Signals credits quota, daily report limit, or daily run budget (429) or a run for this scout is already in progress (409). A manual run counts against the same daily run budget as scheduled runs, so repeated manual runs of the same scout can exhaust the project's daily allowance. A manual run does not change the scout's schedule or `last_run_at`. A disabled scout can still be run this way (to test before enabling). Returns immediately with the workflow id — poll the scout's runs for the result.
* @summary Run a scout now
*/
-export const SignalsScoutConfigRunParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutConfigRunParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this Signal scout config.'),
project_id: zod
.string()
@@ -1049,7 +1049,7 @@ export const SignalsScoutConfigRunParams = /* @__PURE__ */ zod.object({
* Materialize the scout fleet for this project on demand (idempotent): seed the canonical `signals-scout-*` skills, create a default-schedule config for any scout lacking one, retire the skills whose canonical scout no longer ships, and return all scout configs. Normally the Temporal coordinator does this on its next tick; this action exists so the scout UIs and setup flows (e.g. the wizard's self-driving program) can hand the user a tunable fleet immediately.
* @summary Sync scout configs
*/
-export const SignalsScoutConfigSyncParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutConfigSyncParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1057,7 +1057,7 @@ export const SignalsScoutConfigSyncParams = /* @__PURE__ */ zod.object({
),
})
-export const SignalsScoutConfigSyncQueryParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutConfigSyncQueryParams = () => zod.object({
surface: zod
.enum(['roster', 'desktop', 'wizard'])
.optional()
@@ -1070,7 +1070,7 @@ export const SignalsScoutConfigSyncQueryParams = /* @__PURE__ */ zod.object({
* Return the people who can review work on this project — one row per member with access to it, each with their `user_uuid`, `email`, `first_name`/`last_name`, and resolved GitHub `login` (null when they have no linked GitHub identity). The cold-start reviewer-routing path: when a finding's owner can't be read off a fetched entity's `created_by` and there's no cached `reviewer:<area>` memory or inbox precedent, list members, match the owner by email/name, then put their resolved `github_login` in `suggested_reviewers` on `emit-report` / `edit-report`. Pass `search` to narrow a large roster; the result is capped at 200. Strictly team-scoped.
* @summary List project members for reviewer routing
*/
-export const SignalsScoutMembersListParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutMembersListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1078,7 +1078,7 @@ export const SignalsScoutMembersListParams = /* @__PURE__ */ zod.object({
),
})
-export const SignalsScoutMembersListQueryParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutMembersListQueryParams = () => zod.object({
search: zod
.string()
.min(1)
@@ -1092,7 +1092,7 @@ export const SignalsScoutMembersListQueryParams = /* @__PURE__ */ zod.object({
* Return the project's scout metadata: whether it is enrolled, the current announcement banner (e.g. an alpha run-limit notice, or null when unset), and the enforced run limits with current usage. Limits reflect what the coordinator actually applies at dispatch, so a user can see the real throttle rather than what they assume they set. All values come from the `signals-scout` flag payload, so the banner and caps can change with no deploy.
* @summary Get scout metadata
*/
-export const SignalsScoutMetadataGetParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutMetadataGetParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1104,7 +1104,7 @@ export const SignalsScoutMetadataGetParams = /* @__PURE__ */ zod.object({
* Return the steering notes left for this project's scouts, newest first. Pass `skill_name` to get the notes addressed to one scout (or one pipeline audience, e.g. `pipeline:report-research`) plus the general (blank-target) fleet-wide notes — the shape a scout run reads at cold start. Omit `skill_name` to browse every note. Expired notes are excluded unless `include_expired=true`. `date_from` / `date_to` are a half-open window on `created_at` (`>= date_from`, `< date_to`); pass `date_to` (the `created_at` of the oldest note seen) to walk past the cap. Results capped at 500.
* @summary List scout notes
*/
-export const SignalsScoutNotesListParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutNotesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1118,7 +1118,7 @@ export const signalsScoutNotesListQueryIncludeExpiredDefault = false
export const signalsScoutNotesListQueryIncludeGeneralDefault = true
export const signalsScoutNotesListQueryLimitMax = 500
-export const SignalsScoutNotesListQueryParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutNotesListQueryParams = () => zod.object({
content_max_chars: zod
.number()
.min(signalsScoutNotesListQueryContentMaxCharsMin)
@@ -1165,7 +1165,7 @@ export const SignalsScoutNotesListQueryParams = /* @__PURE__ */ zod.object({
* Leave a steering note the scout fleet reads on its next runs. Address it to one scout via `skill_name` (`signals-scout-*`), to one stage of the report pipeline via a reserved audience (`pipeline:report-research`), or omit it for a general note every scout sees. Each call creates a new note (no upsert); delete retires one. Attributed to the authenticated user.
* @summary Leave a note for the scouts
*/
-export const SignalsScoutNotesCreateParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutNotesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1177,7 +1177,7 @@ export const signalsScoutNotesCreateBodyContentMax = 10000
export const signalsScoutNotesCreateBodySkillNameMax = 200
-export const SignalsScoutNotesCreateBody = /* @__PURE__ */ zod
+export const SignalsScoutNotesCreateBody = () => zod
.object({
content: zod
.string()
@@ -1205,7 +1205,7 @@ export const SignalsScoutNotesCreateBody = /* @__PURE__ */ zod
* Delete one note by its `id`, retiring it from every scout's view. Use this when a note has been acted on or no longer applies; time-boxed notes can instead carry an `expires_at` and retire themselves.
* @summary Delete a scout note
*/
-export const SignalsScoutNotesDestroyParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutNotesDestroyParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -1218,7 +1218,7 @@ export const SignalsScoutNotesDestroyParams = /* @__PURE__ */ zod.object({
* Return the team's deterministic project profile. For the internal scout token the response reflects the newest non-expired cached row or a freshly-built one (lazy compute on cache miss); `force_refresh=true` skips the cache and rebuilds from authoritative sources. Public read callers (session auth or a `signal_scout:read` PAK) get the newest cached profile, or 404 if none has been built yet — they never trigger a rebuild. Read this at the start of a run to orient on the team's product mix, integrations, warehouse sources, signal coverage, and existing inbox surface.
* @summary Get the current project profile
*/
-export const SignalsScoutProjectProfileGetParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutProjectProfileGetParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1228,7 +1228,7 @@ export const SignalsScoutProjectProfileGetParams = /* @__PURE__ */ zod.object({
export const signalsScoutProjectProfileGetQueryForceRefreshDefault = false
-export const SignalsScoutProjectProfileGetQueryParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutProjectProfileGetQueryParams = () => zod.object({
force_refresh: zod
.boolean()
.default(signalsScoutProjectProfileGetQueryForceRefreshDefault)
@@ -1241,7 +1241,7 @@ export const SignalsScoutProjectProfileGetQueryParams = /* @__PURE__ */ zod.obje
* Return the most recent `SignalScoutRun` summaries for this project, newest first. Used by the headless scout to dedupe against work other runs already covered. ILIKE matches on `summary`. `date_from` / `date_to` are a half-open window on `created_at` (`>= date_from`, `< date_to`); pass `date_to` on subsequent calls to walk past the 100-row cap. Pass `emitted=true` to see only runs that surfaced at least one finding. Pass `skill_name` (optionally with `skill_version`) to scope to a single scout. Results capped at 100.
* @summary Search recent agent runs
*/
-export const SignalsScoutRunsListParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutRunsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1251,7 +1251,7 @@ export const SignalsScoutRunsListParams = /* @__PURE__ */ zod.object({
export const signalsScoutRunsListQueryLimitMax = 100
-export const SignalsScoutRunsListQueryParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutRunsListQueryParams = () => zod.object({
date_from: zod.iso
.datetime({ offset: true })
.optional()
@@ -1297,7 +1297,7 @@ export const SignalsScoutRunsListQueryParams = /* @__PURE__ */ zod.object({
* Return the full `SignalScoutRun` row. Status, timing, and error flow from the linked `tasks.TaskRun`. Strictly team-scoped — a UUID belonging to another team returns 404.
* @summary Get a run by ID
*/
-export const SignalsScoutRunsRetrieveParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutRunsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1310,7 +1310,7 @@ export const SignalsScoutRunsRetrieveParams = /* @__PURE__ */ zod.object({
* Rewrite a report's title/summary, append a note, and/or set its suggested reviewers. Can target ANY of the project's inbox reports, not just scout-authored ones — so the edit is attributed to this scout. Setting reviewers is how you rescue a report that surfaced routed to no one: it replaces the reviewer list and re-runs autostart, so a report missing a qualifying reviewer can open a draft PR. Title/summary edits are best-effort: the pipeline may later re-research them.
* @summary Edit an existing report for a run
*/
-export const SignalsScoutEditReportParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutEditReportParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1339,7 +1339,7 @@ export const signalsScoutEditReportBodySuggestedPromptsItemMax = 200
export const signalsScoutEditReportBodySuggestedPromptsMax = 3
-export const SignalsScoutEditReportBody = /* @__PURE__ */ zod
+export const SignalsScoutEditReportBody = () => zod
.object({
report_id: zod.string().describe('Id of the report to edit (must belong to this project).'),
title: zod
@@ -1454,7 +1454,7 @@ export const SignalsScoutEditReportBody = /* @__PURE__ */ zod
* Return the findings a `SignalScoutRun` emitted to the inbox, newest first — one row per emit with its `description` (the finding text as surfaced), `weight`, `confidence`, `severity`, and the deterministic `source_id` that joins back to the underlying signal. Lets a team and its agents see *what* a run surfaced without parsing `emitted_finding_ids` or scanning the signal store. Strictly team-scoped — a run UUID belonging to another team returns 404.
* @summary List a run's emitted findings
*/
-export const SignalsScoutRunsEmissionsParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutRunsEmissionsParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1467,7 +1467,7 @@ export const SignalsScoutRunsEmissionsParams = /* @__PURE__ */ zod.object({
* Best-effort reverse of the report -> signals link. For each finding the run emitted, resolve the inbox `SignalReport` (if any) its underlying signal grouped into by walking the deterministic `source_id` back through the signal store. `report` is null when the finding hasn't grouped into a report yet, was de-duplicated away, or its signal was deleted. Lets the scout UI surface which inbox report a finding contributed to — the reverse of the report's evidence list. Strictly team-scoped — a run UUID belonging to another team returns 404.
* @summary List the inbox reports a run's findings linked to
*/
-export const SignalsScoutRunsEmissionReportsParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutRunsEmissionReportsParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1480,7 +1480,7 @@ export const SignalsScoutRunsEmissionReportsParams = /* @__PURE__ */ zod.object(
* The second emit channel: author a complete `SignalReport` directly instead of emitting a weak signal. The report passes the safety judge, then surfaces at the status the scout's `actionability` call implies (or is suppressed). Backing `evidence` is written as bound signals so the report behaves like a pipeline report. NOT idempotent — a retry authors a second report; use `reports` to find a prior report and `edit-report` to update it instead.
* @summary Author a full report for a run
*/
-export const SignalsScoutEmitReportParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutEmitReportParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1512,7 +1512,7 @@ export const signalsScoutEmitReportBodySuggestedPromptsItemMax = 200
export const signalsScoutEmitReportBodySuggestedPromptsMax = 3
-export const SignalsScoutEmitReportBody = /* @__PURE__ */ zod
+export const SignalsScoutEmitReportBody = () => zod
.object({
title: zod
.string()
@@ -1680,7 +1680,7 @@ export const SignalsScoutEmitReportBody = /* @__PURE__ */ zod
* Fire `emit_signal` with `source_product = signals_scout`. The `finding_id` is baked into the deterministic `Signal.source_id = run:<id>:finding:<id>` for traceability, but this is NOT idempotent — a second call with the same `finding_id` emits a second signal, so do not retry an emit that may have already succeeded.
* @summary Emit a finding for a run
*/
-export const SignalsScoutEmitSignalParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutEmitSignalParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1702,7 +1702,7 @@ export const signalsScoutEmitSignalBodyTagsMax = 10
export const signalsScoutEmitSignalBodyFindingIdMax = 100
-export const SignalsScoutEmitSignalBody = /* @__PURE__ */ zod
+export const SignalsScoutEmitSignalBody = () => zod
.object({
description: zod
.string()
@@ -1782,7 +1782,7 @@ export const SignalsScoutEmitSignalBody = /* @__PURE__ */ zod
* The structured-output channel: record schema-validated records this run produced. Opt-in via the scout config's `structured_output_schema` (a JSON Schema describing one record) — without it the call fails closed, as it does for a dry-run scout (emit off). All-or-nothing: any invalid record fails the whole call with nothing written, so fix and resubmit the batch. Each accepted record lands in the project's event stream as a `$scout_structured_output` event — query them like any event (insights, SQL over `events`). Recording is idempotent: event ids are deterministic, so resubmitting an identical batch (e.g. retrying after a 503) cannot double-count.
* @summary Record structured output for a run
*/
-export const SignalsScoutRecordOutputParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutRecordOutputParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1795,7 +1795,7 @@ export const signalsScoutRecordOutputBodyRecordsItemSubjectMax = 200
export const signalsScoutRecordOutputBodyRecordsMax = 100
-export const SignalsScoutRecordOutputBody = /* @__PURE__ */ zod
+export const SignalsScoutRecordOutputBody = () => zod
.object({
records: zod
.array(
@@ -1828,7 +1828,7 @@ export const SignalsScoutRecordOutputBody = /* @__PURE__ */ zod
* Return the team's recently emitted scout findings across *every* run, newest first — the cross-run counterpart to the per-run `emissions` action. Each row carries its `run_id`, so you can regroup by run without first listing runs and fanning out one `emissions` call each. Pass `skill_name` to scope to a single scout, and `date_from` / `date_to` (a half-open window on `emitted_at`) to bound or paginate — set `date_to` to the oldest emission's `emitted_at` to walk back past the limit. Pure Postgres, no ClickHouse round-trip. Capped at 200 rows (default 50).
* @summary List recent emitted findings across all runs
*/
-export const SignalsScoutRunsRecentEmissionsParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutRunsRecentEmissionsParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1838,7 +1838,7 @@ export const SignalsScoutRunsRecentEmissionsParams = /* @__PURE__ */ zod.object(
export const signalsScoutRunsRecentEmissionsQueryLimitMax = 200
-export const SignalsScoutRunsRecentEmissionsQueryParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutRunsRecentEmissionsQueryParams = () => zod.object({
date_from: zod.iso
.datetime({ offset: true })
.optional()
@@ -1868,7 +1868,7 @@ export const SignalsScoutRunsRecentEmissionsQueryParams = /* @__PURE__ */ zod.ob
* Return `SignalScratchpad` entries for this project, newest-first. ILIKE matches on `content` and `key`; pass `key` instead for an exact single-entry lookup. `date_from` / `date_to` are a half-open window on `updated_at` (`>= date_from`, `< date_to`); pass `date_to` (the `updated_at` of the oldest entry seen) on subsequent calls to walk past the cap. Entries whose `expires_at` has passed are excluded unless `include_expired=true`. Pass `keys_only=true` to scan keys without pulling entry bodies, or `content_max_chars` to cap each `content` to a preview — both keep a wide orientation scan from returning every entry's full prose. Results capped at 1000.
* @summary Search the scout scratchpad
*/
-export const SignalsScoutScratchpadSearchParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutScratchpadSearchParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1881,7 +1881,7 @@ export const signalsScoutScratchpadSearchQueryContentMaxCharsMin = 0
export const signalsScoutScratchpadSearchQueryIncludeExpiredDefault = false
export const signalsScoutScratchpadSearchQueryLimitMax = 1000
-export const SignalsScoutScratchpadSearchQueryParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutScratchpadSearchQueryParams = () => zod.object({
content_max_chars: zod
.number()
.min(signalsScoutScratchpadSearchQueryContentMaxCharsMin)
@@ -1934,7 +1934,7 @@ export const SignalsScoutScratchpadSearchQueryParams = /* @__PURE__ */ zod.objec
* Upsert a memory keyed on `(team, key)`. Re-using a key updates the existing entry in place. A write carries the entry's whole state, so `expires_at` is set when passed and cleared when omitted.
* @summary Remember a scratchpad entry
*/
-export const SignalsScoutScratchpadRememberParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutScratchpadRememberParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1946,7 +1946,7 @@ export const signalsScoutScratchpadRememberBodyKeyMax = 300
export const signalsScoutScratchpadRememberBodyContentMax = 50000
-export const SignalsScoutScratchpadRememberBody = /* @__PURE__ */ zod
+export const SignalsScoutScratchpadRememberBody = () => zod
.object({
key: zod
.string()
@@ -1977,7 +1977,7 @@ export const SignalsScoutScratchpadRememberBody = /* @__PURE__ */ zod
* Delete an entry by key. Returns `deleted=false` if no row matched.
* @summary Forget a scratchpad entry by key
*/
-export const SignalsScoutScratchpadForgetParams = /* @__PURE__ */ zod.object({
+export const SignalsScoutScratchpadForgetParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1987,13 +1987,13 @@ export const SignalsScoutScratchpadForgetParams = /* @__PURE__ */ zod.object({
export const signalsScoutScratchpadForgetBodyKeyMax = 300
-export const SignalsScoutScratchpadForgetBody = /* @__PURE__ */ zod
+export const SignalsScoutScratchpadForgetBody = () => zod
.object({
key: zod.string().max(signalsScoutScratchpadForgetBodyKeyMax).describe('Memory key to delete.'),
})
.describe('Request body for `forget`.')
-export const SignalsSourceConfigsListParams = /* @__PURE__ */ zod.object({
+export const SignalsSourceConfigsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2001,12 +2001,12 @@ export const SignalsSourceConfigsListParams = /* @__PURE__ */ zod.object({
),
})
-export const SignalsSourceConfigsListQueryParams = /* @__PURE__ */ zod.object({
+export const SignalsSourceConfigsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const SignalsSourceConfigsCreateParams = /* @__PURE__ */ zod.object({
+export const SignalsSourceConfigsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2014,7 +2014,7 @@ export const SignalsSourceConfigsCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const SignalsSourceConfigsCreateBody = /* @__PURE__ */ zod.object({
+export const SignalsSourceConfigsCreateBody = () => zod.object({
source_product: zod
.enum([
'session_replay',
@@ -2105,7 +2105,7 @@ export const SignalsSourceConfigsCreateBody = /* @__PURE__ */ zod.object({
),
})
-export const SignalsSourceConfigsRetrieveParams = /* @__PURE__ */ zod.object({
+export const SignalsSourceConfigsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this signal source config.'),
project_id: zod
.string()
@@ -2114,7 +2114,7 @@ export const SignalsSourceConfigsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const SignalsSourceConfigsUpdateParams = /* @__PURE__ */ zod.object({
+export const SignalsSourceConfigsUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this signal source config.'),
project_id: zod
.string()
@@ -2123,7 +2123,7 @@ export const SignalsSourceConfigsUpdateParams = /* @__PURE__ */ zod.object({
),
})
-export const SignalsSourceConfigsUpdateBody = /* @__PURE__ */ zod.object({
+export const SignalsSourceConfigsUpdateBody = () => zod.object({
source_product: zod
.enum([
'session_replay',
@@ -2214,7 +2214,7 @@ export const SignalsSourceConfigsUpdateBody = /* @__PURE__ */ zod.object({
),
})
-export const SignalsSourceConfigsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const SignalsSourceConfigsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this signal source config.'),
project_id: zod
.string()
@@ -2223,7 +2223,7 @@ export const SignalsSourceConfigsPartialUpdateParams = /* @__PURE__ */ zod.objec
),
})
-export const SignalsSourceConfigsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const SignalsSourceConfigsPartialUpdateBody = () => zod.object({
source_product: zod
.enum([
'session_replay',
diff --git a/services/mcp/src/generated/skills/api.ts b/services/mcp/src/generated/skills/api.ts
index 7b971a38c9a9..0f5710ca6e41 100644
--- a/services/mcp/src/generated/skills/api.ts
+++ b/services/mcp/src/generated/skills/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const LlmSkillsListParams = /* @__PURE__ */ zod.object({
+export const LlmSkillsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,7 +16,7 @@ export const LlmSkillsListParams = /* @__PURE__ */ zod.object({
),
})
-export const LlmSkillsListQueryParams = /* @__PURE__ */ zod.object({
+export const LlmSkillsListQueryParams = () => zod.object({
category: zod
.string()
.optional()
@@ -35,7 +35,7 @@ export const LlmSkillsListQueryParams = /* @__PURE__ */ zod.object({
search: zod.string().optional().describe('Optional substring filter applied to skill names and descriptions.'),
})
-export const LlmSkillsCreateParams = /* @__PURE__ */ zod.object({
+export const LlmSkillsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -58,7 +58,7 @@ export const llmSkillsCreateBodyFilesItemPathMax = 500
export const llmSkillsCreateBodyFilesItemContentTypeDefault = `text/plain`
export const llmSkillsCreateBodyFilesItemContentTypeMax = 100
-export const LlmSkillsCreateBody = /* @__PURE__ */ zod
+export const LlmSkillsCreateBody = () => zod
.object({
name: zod
.string()
@@ -118,7 +118,7 @@ export const LlmSkillsCreateBody = /* @__PURE__ */ zod
*
* Per-user: rotating only ever invalidates this user's own credential, never a teammate's.
*/
-export const LlmSkillsMarketplaceInstallCommandCreateParams = /* @__PURE__ */ zod.object({
+export const LlmSkillsMarketplaceInstallCommandCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -128,7 +128,7 @@ export const LlmSkillsMarketplaceInstallCommandCreateParams = /* @__PURE__ */ zo
export const llmSkillsMarketplaceInstallCommandCreateBodyRotateDefault = false
-export const LlmSkillsMarketplaceInstallCommandCreateBody = /* @__PURE__ */ zod.object({
+export const LlmSkillsMarketplaceInstallCommandCreateBody = () => zod.object({
rotate: zod
.boolean()
.default(llmSkillsMarketplaceInstallCommandCreateBodyRotateDefault)
@@ -139,7 +139,7 @@ export const LlmSkillsMarketplaceInstallCommandCreateBody = /* @__PURE__ */ zod.
export const llmSkillsNameRetrievePathSkillNameRegExp = new RegExp('^[^\/]+$')
-export const LlmSkillsNameRetrieveParams = /* @__PURE__ */ zod.object({
+export const LlmSkillsNameRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -150,7 +150,7 @@ export const LlmSkillsNameRetrieveParams = /* @__PURE__ */ zod.object({
export const llmSkillsNameRetrieveQueryBodyOffsetMin = 0
-export const LlmSkillsNameRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const LlmSkillsNameRetrieveQueryParams = () => zod.object({
body_length: zod
.number()
.min(1)
@@ -174,7 +174,7 @@ export const LlmSkillsNameRetrieveQueryParams = /* @__PURE__ */ zod.object({
export const llmSkillsNamePartialUpdatePathSkillNameRegExp = new RegExp('^[^\/]+$')
-export const LlmSkillsNamePartialUpdateParams = /* @__PURE__ */ zod.object({
+export const LlmSkillsNamePartialUpdateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -200,7 +200,7 @@ export const llmSkillsNamePartialUpdateBodyOwnersMax = 25
export const llmSkillsNamePartialUpdateBodyVersionDescriptionMax = 400
-export const LlmSkillsNamePartialUpdateBody = /* @__PURE__ */ zod.object({
+export const LlmSkillsNamePartialUpdateBody = () => zod.object({
body: zod
.string()
.optional()
@@ -303,7 +303,7 @@ export const LlmSkillsNamePartialUpdateBody = /* @__PURE__ */ zod.object({
export const llmSkillsNameArchiveCreatePathSkillNameRegExp = new RegExp('^[^\/]+$')
-export const LlmSkillsNameArchiveCreateParams = /* @__PURE__ */ zod.object({
+export const LlmSkillsNameArchiveCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -314,7 +314,7 @@ export const LlmSkillsNameArchiveCreateParams = /* @__PURE__ */ zod.object({
export const llmSkillsNameDuplicateCreatePathSkillNameRegExp = new RegExp('^[^\/]+$')
-export const LlmSkillsNameDuplicateCreateParams = /* @__PURE__ */ zod.object({
+export const LlmSkillsNameDuplicateCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -325,7 +325,7 @@ export const LlmSkillsNameDuplicateCreateParams = /* @__PURE__ */ zod.object({
export const llmSkillsNameDuplicateCreateBodyNewNameMax = 64
-export const LlmSkillsNameDuplicateCreateBody = /* @__PURE__ */ zod.object({
+export const LlmSkillsNameDuplicateCreateBody = () => zod.object({
new_name: zod
.string()
.max(llmSkillsNameDuplicateCreateBodyNewNameMax)
@@ -334,7 +334,7 @@ export const LlmSkillsNameDuplicateCreateBody = /* @__PURE__ */ zod.object({
export const llmSkillsNameFilesCreatePathSkillNameRegExp = new RegExp('^[^\/]+$')
-export const LlmSkillsNameFilesCreateParams = /* @__PURE__ */ zod.object({
+export const LlmSkillsNameFilesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -348,7 +348,7 @@ export const llmSkillsNameFilesCreateBodyPathMax = 500
export const llmSkillsNameFilesCreateBodyContentTypeDefault = `text/plain`
export const llmSkillsNameFilesCreateBodyContentTypeMax = 100
-export const LlmSkillsNameFilesCreateBody = /* @__PURE__ */ zod.object({
+export const LlmSkillsNameFilesCreateBody = () => zod.object({
path: zod
.string()
.max(llmSkillsNameFilesCreateBodyPathMax)
@@ -370,7 +370,7 @@ export const LlmSkillsNameFilesCreateBody = /* @__PURE__ */ zod.object({
export const llmSkillsNameFilesRenameCreatePathSkillNameRegExp = new RegExp('^[^\/]+$')
-export const LlmSkillsNameFilesRenameCreateParams = /* @__PURE__ */ zod.object({
+export const LlmSkillsNameFilesRenameCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -383,7 +383,7 @@ export const llmSkillsNameFilesRenameCreateBodyOldPathMax = 500
export const llmSkillsNameFilesRenameCreateBodyNewPathMax = 500
-export const LlmSkillsNameFilesRenameCreateBody = /* @__PURE__ */ zod.object({
+export const LlmSkillsNameFilesRenameCreateBody = () => zod.object({
old_path: zod.string().max(llmSkillsNameFilesRenameCreateBodyOldPathMax).describe('Current file path to rename.'),
new_path: zod
.string()
@@ -401,7 +401,7 @@ export const LlmSkillsNameFilesRenameCreateBody = /* @__PURE__ */ zod.object({
export const llmSkillsNameFilesRetrievePathFilePathRegExp = new RegExp('^.+$')
export const llmSkillsNameFilesRetrievePathSkillNameRegExp = new RegExp('^[^\/]+$')
-export const LlmSkillsNameFilesRetrieveParams = /* @__PURE__ */ zod.object({
+export const LlmSkillsNameFilesRetrieveParams = () => zod.object({
file_path: zod.string().regex(llmSkillsNameFilesRetrievePathFilePathRegExp),
project_id: zod
.string()
@@ -411,7 +411,7 @@ export const LlmSkillsNameFilesRetrieveParams = /* @__PURE__ */ zod.object({
skill_name: zod.string().regex(llmSkillsNameFilesRetrievePathSkillNameRegExp),
})
-export const LlmSkillsNameFilesRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const LlmSkillsNameFilesRetrieveQueryParams = () => zod.object({
version: zod
.number()
.min(1)
@@ -422,7 +422,7 @@ export const LlmSkillsNameFilesRetrieveQueryParams = /* @__PURE__ */ zod.object(
export const llmSkillsNameFilesDestroyPathFilePathRegExp = new RegExp('^.+$')
export const llmSkillsNameFilesDestroyPathSkillNameRegExp = new RegExp('^[^\/]+$')
-export const LlmSkillsNameFilesDestroyParams = /* @__PURE__ */ zod.object({
+export const LlmSkillsNameFilesDestroyParams = () => zod.object({
file_path: zod.string().regex(llmSkillsNameFilesDestroyPathFilePathRegExp),
project_id: zod
.string()
@@ -432,7 +432,7 @@ export const LlmSkillsNameFilesDestroyParams = /* @__PURE__ */ zod.object({
skill_name: zod.string().regex(llmSkillsNameFilesDestroyPathSkillNameRegExp),
})
-export const LlmSkillsNameFilesDestroyQueryParams = /* @__PURE__ */ zod.object({
+export const LlmSkillsNameFilesDestroyQueryParams = () => zod.object({
base_version: zod
.number()
.min(1)
diff --git a/services/mcp/src/generated/stamphog/api.ts b/services/mcp/src/generated/stamphog/api.ts
index 40bdff583837..01212fd1455a 100644
--- a/services/mcp/src/generated/stamphog/api.ts
+++ b/services/mcp/src/generated/stamphog/api.ts
@@ -11,7 +11,7 @@ import * as zod from 'zod'
/**
* Read-only history of posted (or attempted) digests, filterable by Slack channel.
*/
-export const StamphogDigestRunsListParams = /* @__PURE__ */ zod.object({
+export const StamphogDigestRunsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -19,7 +19,7 @@ export const StamphogDigestRunsListParams = /* @__PURE__ */ zod.object({
),
})
-export const StamphogDigestRunsListQueryParams = /* @__PURE__ */ zod.object({
+export const StamphogDigestRunsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
slack_channel_id: zod
@@ -31,7 +31,7 @@ export const StamphogDigestRunsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Read-only pull requests stamphog knows about, filterable by PR number and merge state.
*/
-export const StamphogPullRequestsListParams = /* @__PURE__ */ zod.object({
+export const StamphogPullRequestsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -39,7 +39,7 @@ export const StamphogPullRequestsListParams = /* @__PURE__ */ zod.object({
),
})
-export const StamphogPullRequestsListQueryParams = /* @__PURE__ */ zod.object({
+export const StamphogPullRequestsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
merged: zod
.boolean()
@@ -52,7 +52,7 @@ export const StamphogPullRequestsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Read-only pull requests stamphog knows about, filterable by PR number and merge state.
*/
-export const StamphogPullRequestsRetrieveParams = /* @__PURE__ */ zod.object({
+export const StamphogPullRequestsRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -64,7 +64,7 @@ export const StamphogPullRequestsRetrieveParams = /* @__PURE__ */ zod.object({
/**
* Per-repo stamphog settings — enable/disable review, GitHub App installation, policy overrides.
*/
-export const StamphogRepoConfigsListParams = /* @__PURE__ */ zod.object({
+export const StamphogRepoConfigsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -72,7 +72,7 @@ export const StamphogRepoConfigsListParams = /* @__PURE__ */ zod.object({
),
})
-export const StamphogRepoConfigsListQueryParams = /* @__PURE__ */ zod.object({
+export const StamphogRepoConfigsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
@@ -80,7 +80,7 @@ export const StamphogRepoConfigsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Per-repo stamphog settings — enable/disable review, GitHub App installation, policy overrides.
*/
-export const StamphogRepoConfigsRetrieveParams = /* @__PURE__ */ zod.object({
+export const StamphogRepoConfigsRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -92,7 +92,7 @@ export const StamphogRepoConfigsRetrieveParams = /* @__PURE__ */ zod.object({
/**
* Per-repo stamphog settings — enable/disable review, GitHub App installation, policy overrides.
*/
-export const StamphogRepoConfigsDestroyParams = /* @__PURE__ */ zod.object({
+export const StamphogRepoConfigsDestroyParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -104,7 +104,7 @@ export const StamphogRepoConfigsDestroyParams = /* @__PURE__ */ zod.object({
/**
* Read-only history of stamphog review runs, filterable by repository, PR number, and status.
*/
-export const StamphogReviewRunsListParams = /* @__PURE__ */ zod.object({
+export const StamphogReviewRunsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -112,7 +112,7 @@ export const StamphogReviewRunsListParams = /* @__PURE__ */ zod.object({
),
})
-export const StamphogReviewRunsListQueryParams = /* @__PURE__ */ zod.object({
+export const StamphogReviewRunsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
pr_number: zod.number().optional().describe('Filter by pull request number.'),
@@ -127,7 +127,7 @@ export const StamphogReviewRunsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Read-only history of stamphog review runs, filterable by repository, PR number, and status.
*/
-export const StamphogReviewRunsRetrieveParams = /* @__PURE__ */ zod.object({
+export const StamphogReviewRunsRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
diff --git a/services/mcp/src/generated/streamlit_apps/api.ts b/services/mcp/src/generated/streamlit_apps/api.ts
index 10f1ce76d496..a3fb5dbf376c 100644
--- a/services/mcp/src/generated/streamlit_apps/api.ts
+++ b/services/mcp/src/generated/streamlit_apps/api.ts
@@ -11,7 +11,7 @@ import * as zod from 'zod'
/**
* @summary List streamlit apps
*/
-export const StreamlitAppsListParams = /* @__PURE__ */ zod.object({
+export const StreamlitAppsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -19,7 +19,7 @@ export const StreamlitAppsListParams = /* @__PURE__ */ zod.object({
),
})
-export const StreamlitAppsListQueryParams = /* @__PURE__ */ zod.object({
+export const StreamlitAppsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
@@ -27,7 +27,7 @@ export const StreamlitAppsListQueryParams = /* @__PURE__ */ zod.object({
/**
* @summary Create a streamlit app
*/
-export const StreamlitAppsCreateParams = /* @__PURE__ */ zod.object({
+export const StreamlitAppsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -35,7 +35,7 @@ export const StreamlitAppsCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const StreamlitAppsCreateBody = /* @__PURE__ */ zod.object({
+export const StreamlitAppsCreateBody = () => zod.object({
name: zod.string().describe('Name of the app.'),
description: zod.string().optional().describe('Optional description of the app.'),
cpu_cores: zod.number().optional().describe('CPU cores allocated to the sandbox.'),
@@ -45,7 +45,7 @@ export const StreamlitAppsCreateBody = /* @__PURE__ */ zod.object({
/**
* @summary Retrieve a streamlit app
*/
-export const StreamlitAppsRetrieveParams = /* @__PURE__ */ zod.object({
+export const StreamlitAppsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -57,7 +57,7 @@ export const StreamlitAppsRetrieveParams = /* @__PURE__ */ zod.object({
/**
* @summary Partially update a streamlit app
*/
-export const StreamlitAppsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const StreamlitAppsPartialUpdateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -66,7 +66,7 @@ export const StreamlitAppsPartialUpdateParams = /* @__PURE__ */ zod.object({
short_id: zod.string(),
})
-export const StreamlitAppsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const StreamlitAppsPartialUpdateBody = () => zod.object({
name: zod.string().optional().describe('New name for the app.'),
description: zod.string().optional().describe('New description for the app.'),
cpu_cores: zod.number().optional().describe('New CPU core allocation for the sandbox.'),
@@ -76,7 +76,7 @@ export const StreamlitAppsPartialUpdateBody = /* @__PURE__ */ zod.object({
/**
* @summary Delete a streamlit app
*/
-export const StreamlitAppsDestroyParams = /* @__PURE__ */ zod.object({
+export const StreamlitAppsDestroyParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -88,7 +88,7 @@ export const StreamlitAppsDestroyParams = /* @__PURE__ */ zod.object({
/**
* @summary Create an app version from source code
*/
-export const StreamlitAppsCreateVersionFromSourceCreateParams = /* @__PURE__ */ zod.object({
+export const StreamlitAppsCreateVersionFromSourceCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -99,7 +99,7 @@ export const StreamlitAppsCreateVersionFromSourceCreateParams = /* @__PURE__ */
export const streamlitAppsCreateVersionFromSourceCreateBodySourceMax = 1048576
-export const StreamlitAppsCreateVersionFromSourceCreateBody = /* @__PURE__ */ zod.object({
+export const StreamlitAppsCreateVersionFromSourceCreateBody = () => zod.object({
source: zod
.string()
.max(streamlitAppsCreateVersionFromSourceCreateBodySourceMax)
@@ -111,7 +111,7 @@ export const StreamlitAppsCreateVersionFromSourceCreateBody = /* @__PURE__ */ zo
/**
* @summary Start the app sandbox
*/
-export const StreamlitAppsStartCreateParams = /* @__PURE__ */ zod.object({
+export const StreamlitAppsStartCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -123,7 +123,7 @@ export const StreamlitAppsStartCreateParams = /* @__PURE__ */ zod.object({
/**
* @summary Get app sandbox status
*/
-export const StreamlitAppsStatusRetrieveParams = /* @__PURE__ */ zod.object({
+export const StreamlitAppsStatusRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -135,7 +135,7 @@ export const StreamlitAppsStatusRetrieveParams = /* @__PURE__ */ zod.object({
/**
* @summary Stop the app sandbox
*/
-export const StreamlitAppsStopCreateParams = /* @__PURE__ */ zod.object({
+export const StreamlitAppsStopCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -147,7 +147,7 @@ export const StreamlitAppsStopCreateParams = /* @__PURE__ */ zod.object({
/**
* @summary List app versions
*/
-export const StreamlitAppsVersionsRetrieveParams = /* @__PURE__ */ zod.object({
+export const StreamlitAppsVersionsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
diff --git a/services/mcp/src/generated/subscriptions/api.ts b/services/mcp/src/generated/subscriptions/api.ts
index 14dd3cdfcceb..a5b60067a520 100644
--- a/services/mcp/src/generated/subscriptions/api.ts
+++ b/services/mcp/src/generated/subscriptions/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const SubscriptionsListParams = /* @__PURE__ */ zod.object({
+export const SubscriptionsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,7 +16,7 @@ export const SubscriptionsListParams = /* @__PURE__ */ zod.object({
),
})
-export const SubscriptionsListQueryParams = /* @__PURE__ */ zod.object({
+export const SubscriptionsListQueryParams = () => zod.object({
created_by: zod.string().optional().describe('Filter by creator user UUID.'),
dashboard: zod.number().optional().describe('Filter by dashboard ID.'),
dashboard_tiles: zod
@@ -39,7 +39,7 @@ export const SubscriptionsListQueryParams = /* @__PURE__ */ zod.object({
.describe('Filter by delivery channel: email, Slack, or Microsoft Teams.'),
})
-export const SubscriptionsCreateParams = /* @__PURE__ */ zod.object({
+export const SubscriptionsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -67,7 +67,7 @@ export const subscriptionsCreateBodySummaryPromptGuideMax = 500
export const subscriptionsCreateBodyDeliveryConfigOnePostAllInsightsInMainMessageDefault = false
-export const SubscriptionsCreateBody = /* @__PURE__ */ zod
+export const SubscriptionsCreateBody = () => zod
.object({
dashboard: zod
.number()
@@ -234,7 +234,7 @@ export const SubscriptionsCreateBody = /* @__PURE__ */ zod
})
.describe('Standard Subscription serializer.')
-export const SubscriptionsRetrieveParams = /* @__PURE__ */ zod.object({
+export const SubscriptionsRetrieveParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this subscription.'),
project_id: zod
.string()
@@ -243,7 +243,7 @@ export const SubscriptionsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const SubscriptionsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const SubscriptionsPartialUpdateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this subscription.'),
project_id: zod
.string()
@@ -272,7 +272,7 @@ export const subscriptionsPartialUpdateBodySummaryPromptGuideMax = 500
export const subscriptionsPartialUpdateBodyDeliveryConfigOnePostAllInsightsInMainMessageDefault = false
-export const SubscriptionsPartialUpdateBody = /* @__PURE__ */ zod
+export const SubscriptionsPartialUpdateBody = () => zod
.object({
dashboard: zod
.number()
@@ -441,7 +441,7 @@ export const SubscriptionsPartialUpdateBody = /* @__PURE__ */ zod
/**
* Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
*/
-export const SubscriptionsDestroyParams = /* @__PURE__ */ zod.object({
+export const SubscriptionsDestroyParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this subscription.'),
project_id: zod
.string()
@@ -450,7 +450,7 @@ export const SubscriptionsDestroyParams = /* @__PURE__ */ zod.object({
),
})
-export const SubscriptionsTestDeliveryCreateParams = /* @__PURE__ */ zod.object({
+export const SubscriptionsTestDeliveryCreateParams = () => zod.object({
id: zod.number().describe('A unique integer value identifying this subscription.'),
project_id: zod
.string()
@@ -463,7 +463,7 @@ export const SubscriptionsTestDeliveryCreateParams = /* @__PURE__ */ zod.object(
* Paginated delivery history for a subscription. Requires premium subscriptions.
* @summary List subscription deliveries
*/
-export const SubscriptionsDeliveriesListParams = /* @__PURE__ */ zod.object({
+export const SubscriptionsDeliveriesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -472,7 +472,7 @@ export const SubscriptionsDeliveriesListParams = /* @__PURE__ */ zod.object({
subscription_id: zod.number(),
})
-export const SubscriptionsDeliveriesListQueryParams = /* @__PURE__ */ zod.object({
+export const SubscriptionsDeliveriesListQueryParams = () => zod.object({
cursor: zod.string().optional().describe('The pagination cursor value.'),
status: zod
.enum(['completed', 'failed', 'skipped', 'starting'])
@@ -484,7 +484,7 @@ export const SubscriptionsDeliveriesListQueryParams = /* @__PURE__ */ zod.object
* Fetch one delivery row by id.
* @summary Retrieve subscription delivery
*/
-export const SubscriptionsDeliveriesRetrieveParams = /* @__PURE__ */ zod.object({
+export const SubscriptionsDeliveriesRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this subscription delivery.'),
project_id: zod
.string()
diff --git a/services/mcp/src/generated/surveys/api.ts b/services/mcp/src/generated/surveys/api.ts
index 9123ab3a7768..b7b99d8c167b 100644
--- a/services/mcp/src/generated/surveys/api.ts
+++ b/services/mcp/src/generated/surveys/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const SurveysListParams = /* @__PURE__ */ zod.object({
+export const SurveysListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,7 +16,7 @@ export const SurveysListParams = /* @__PURE__ */ zod.object({
),
})
-export const SurveysListQueryParams = /* @__PURE__ */ zod.object({
+export const SurveysListQueryParams = () => zod.object({
archived: zod.boolean().optional(),
created_by: zod.number().optional().describe('Filter surveys by the ID of the user who created them.'),
ids: zod.array(zod.string()).optional().describe('Multiple values may be separated by commas.'),
@@ -42,7 +42,7 @@ export const SurveysListQueryParams = /* @__PURE__ */ zod.object({
),
})
-export const SurveysCreateParams = /* @__PURE__ */ zod.object({
+export const SurveysCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -84,7 +84,7 @@ export const surveysCreateBodyResponseSamplingLimitMax = 2147483647
export const surveysCreateBodyBaseLanguageMax = 20
-export const SurveysCreateBody = /* @__PURE__ */ zod.object({
+export const SurveysCreateBody = () => zod.object({
name: zod
.string()
.min(1)
@@ -909,7 +909,7 @@ export const SurveysCreateBody = /* @__PURE__ */ zod.object({
form_content: zod.unknown().optional(),
})
-export const SurveysRetrieveParams = /* @__PURE__ */ zod.object({
+export const SurveysRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this survey.'),
project_id: zod
.string()
@@ -918,7 +918,7 @@ export const SurveysRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const SurveysPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const SurveysPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this survey.'),
project_id: zod
.string()
@@ -961,7 +961,7 @@ export const surveysPartialUpdateBodyResponseSamplingLimitMax = 2147483647
export const surveysPartialUpdateBodyBaseLanguageMax = 20
-export const SurveysPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const SurveysPartialUpdateBody = () => zod.object({
name: zod
.string()
.min(1)
@@ -1788,7 +1788,7 @@ export const SurveysPartialUpdateBody = /* @__PURE__ */ zod.object({
form_content: zod.unknown().optional(),
})
-export const SurveysDestroyParams = /* @__PURE__ */ zod.object({
+export const SurveysDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this survey.'),
project_id: zod
.string()
@@ -1800,7 +1800,7 @@ export const SurveysDestroyParams = /* @__PURE__ */ zod.object({
/**
* Launch a survey by setting `start_date` to the current time. No-op if the survey is already launched (start_date set in the past) — returns the existing state unchanged. Does not affect archived surveys or surveys with an end_date in the past; unarchive or extend the end_date first.
*/
-export const SurveysLaunchParams = /* @__PURE__ */ zod.object({
+export const SurveysLaunchParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this survey.'),
project_id: zod
.string()
@@ -1812,7 +1812,7 @@ export const SurveysLaunchParams = /* @__PURE__ */ zod.object({
/**
* List survey responses for a specific survey, with question text resolved server-side so callers do not have to map opaque `$survey_response_<id>` keys. Each row carries `distinct_id`, `session_id`, `submitted_at`, and an `extra` block (device, browser, OS, geoip, current_url, iteration) so agents can cross-pivot to recordings, persons, or paths in a single follow-up call. For person properties at event time, follow up with `persons-get` using the returned `distinct_id` — keeps scopes scoped. Use `question_id` + `score_lte` to fetch NPS detractors and similar score-filtered cohorts.
*/
-export const SurveysResponsesListParams = /* @__PURE__ */ zod.object({
+export const SurveysResponsesListParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this survey.'),
project_id: zod
.string()
@@ -1828,7 +1828,7 @@ export const surveysResponsesListQueryLimitMax = 500
export const surveysResponsesListQueryOffsetDefault = 0
export const surveysResponsesListQueryOffsetMin = 0
-export const SurveysResponsesListQueryParams = /* @__PURE__ */ zod.object({
+export const SurveysResponsesListQueryParams = () => zod.object({
exclude_archived: zod
.boolean()
.default(surveysResponsesListQueryExcludeArchivedDefault)
@@ -1885,7 +1885,7 @@ export const SurveysResponsesListQueryParams = /* @__PURE__ */ zod.object({
* Returns:
* Survey statistics including event counts, unique respondents, and conversion rates
*/
-export const SurveysStatsRetrieveParams = /* @__PURE__ */ zod.object({
+export const SurveysStatsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this survey.'),
project_id: zod
.string()
@@ -1894,7 +1894,7 @@ export const SurveysStatsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const SurveysStatsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const SurveysStatsRetrieveQueryParams = () => zod.object({
date_from: zod.iso
.datetime({ offset: true })
.optional()
@@ -1914,7 +1914,7 @@ export const SurveysStatsRetrieveQueryParams = /* @__PURE__ */ zod.object({
/**
* Stop a survey by setting `end_date` to the current time. No new responses are accepted after this; existing responses remain available. No-op if the survey already has an end_date in the past.
*/
-export const SurveysStopParams = /* @__PURE__ */ zod.object({
+export const SurveysStopParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this survey.'),
project_id: zod
.string()
@@ -1926,7 +1926,7 @@ export const SurveysStopParams = /* @__PURE__ */ zod.object({
/**
* Summarize survey responses. When `question_index` or `question_id` is provided, returns a per-question theme summary using cached `survey.question_summaries` when fresh. When neither is provided, returns the survey-wide headline summary (delegates to summary_headline). Pass `force_refresh=true` in the body to bypass caches.
*/
-export const SurveysSummarizeResponsesCreateParams = /* @__PURE__ */ zod.object({
+export const SurveysSummarizeResponsesCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this survey.'),
project_id: zod
.string()
@@ -1935,7 +1935,7 @@ export const SurveysSummarizeResponsesCreateParams = /* @__PURE__ */ zod.object(
),
})
-export const SurveysSummarizeResponsesCreateQueryParams = /* @__PURE__ */ zod.object({
+export const SurveysSummarizeResponsesCreateQueryParams = () => zod.object({
question_id: zod
.string()
.optional()
@@ -1948,7 +1948,7 @@ export const SurveysSummarizeResponsesCreateQueryParams = /* @__PURE__ */ zod.ob
export const surveysSummarizeResponsesCreateBodyForceRefreshDefault = false
-export const SurveysSummarizeResponsesCreateBody = /* @__PURE__ */ zod.object({
+export const SurveysSummarizeResponsesCreateBody = () => zod.object({
force_refresh: zod
.boolean()
.default(surveysSummarizeResponsesCreateBodyForceRefreshDefault)
@@ -1965,7 +1965,7 @@ export const SurveysSummarizeResponsesCreateBody = /* @__PURE__ */ zod.object({
* Returns:
* Aggregated statistics across all surveys including total counts and rates
*/
-export const SurveysGlobalStatsRetrieveParams = /* @__PURE__ */ zod.object({
+export const SurveysGlobalStatsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1973,7 +1973,7 @@ export const SurveysGlobalStatsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const SurveysGlobalStatsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const SurveysGlobalStatsRetrieveQueryParams = () => zod.object({
date_from: zod.iso
.datetime({ offset: true })
.optional()
diff --git a/services/mcp/src/generated/tasks/api.ts b/services/mcp/src/generated/tasks/api.ts
index 198da33e0a31..669c327082b6 100644
--- a/services/mcp/src/generated/tasks/api.ts
+++ b/services/mcp/src/generated/tasks/api.ts
@@ -12,7 +12,7 @@ import * as zod from 'zod'
* List loops visible to the caller: personal loops they own, plus every team loop. The response also carries `max_loops_per_team` and `total_loop_count` so a client can show remaining capacity and disable creation at the cap without hardcoding the limit.
* @summary List loops
*/
-export const LoopsListParams = /* @__PURE__ */ zod.object({
+export const LoopsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -20,7 +20,7 @@ export const LoopsListParams = /* @__PURE__ */ zod.object({
),
})
-export const LoopsListQueryParams = /* @__PURE__ */ zod.object({
+export const LoopsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
@@ -30,7 +30,7 @@ export const LoopsListQueryParams = /* @__PURE__ */ zod.object({
* schedule, GitHub events or authenticated API calls. See `products/tasks/docs/LOOPS.md`.
* @summary Create a loop
*/
-export const LoopsCreateParams = /* @__PURE__ */ zod.object({
+export const LoopsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -67,7 +67,7 @@ export const loopsCreateBodyContextTargetOneOutputsOnePostToFeedDefault = false
export const loopsCreateBodyContextTargetOneOutputsOneUpdateContextDefault = false
export const loopsCreateBodyTriggersItemEnabledDefault = true
-export const LoopsCreateBody = /* @__PURE__ */ zod
+export const LoopsCreateBody = () => zod
.object({
name: zod.string().max(loopsCreateBodyNameMax).describe('Display name for the loop.'),
description: zod
@@ -339,7 +339,7 @@ export const LoopsCreateBody = /* @__PURE__ */ zod
* schedule, GitHub events or authenticated API calls. See `products/tasks/docs/LOOPS.md`.
* @summary Get a loop
*/
-export const LoopsRetrieveParams = /* @__PURE__ */ zod.object({
+export const LoopsRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -352,7 +352,7 @@ export const LoopsRetrieveParams = /* @__PURE__ */ zod.object({
* Partial update. Identity-bearing fields (instructions, repositories, connectors, behaviors, model config, triggers) are owner-only on team loops; name, description, notifications and enable/pause are editable by any team member.
* @summary Update a loop
*/
-export const LoopsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const LoopsPartialUpdateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -384,7 +384,7 @@ export const loopsPartialUpdateBodyContextTargetOneOutputsOnePostToFeedDefault =
export const loopsPartialUpdateBodyContextTargetOneOutputsOneUpdateContextDefault = false
export const loopsPartialUpdateBodyTriggersItemEnabledDefault = true
-export const LoopsPartialUpdateBody = /* @__PURE__ */ zod
+export const LoopsPartialUpdateBody = () => zod
.object({
name: zod.string().max(loopsPartialUpdateBodyNameMax).optional().describe('Display name for the loop.'),
description: zod.string().optional().describe('Free-form description of what this loop does.'),
@@ -653,7 +653,7 @@ export const LoopsPartialUpdateBody = /* @__PURE__ */ zod
* Soft delete. Pauses every trigger's schedule. Owner or a project admin only.
* @summary Delete a loop
*/
-export const LoopsDestroyParams = /* @__PURE__ */ zod.object({
+export const LoopsDestroyParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -666,7 +666,7 @@ export const LoopsDestroyParams = /* @__PURE__ */ zod.object({
* Dry run: renders the assembled instructions and trigger context for a supplied sample payload (or a synthetic schedule fire when omitted), without creating a task, run, or any other side effect.
* @summary Preview a loop fire
*/
-export const LoopsPreviewCreateParams = /* @__PURE__ */ zod.object({
+export const LoopsPreviewCreateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -677,7 +677,7 @@ export const LoopsPreviewCreateParams = /* @__PURE__ */ zod.object({
export const loopsPreviewCreateBodyTriggerTypeDefault = `schedule`
-export const LoopsPreviewCreateBody = /* @__PURE__ */ zod.object({
+export const LoopsPreviewCreateBody = () => zod.object({
trigger_type: zod
.enum(['schedule', 'github', 'api'])
.describe('\* `schedule` - schedule\n\* `github` - github\n\* `api` - api')
@@ -695,7 +695,7 @@ export const LoopsPreviewCreateBody = /* @__PURE__ */ zod.object({
* Manual fire from the UI. Owner-only for personal loops; any team member for team loops.
* @summary Run a loop manually
*/
-export const LoopsRunCreateParams = /* @__PURE__ */ zod.object({
+export const LoopsRunCreateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -708,7 +708,7 @@ export const LoopsRunCreateParams = /* @__PURE__ */ zod.object({
* Run history for a loop, newest first, cursor-paginated.
* @summary List loop runs
*/
-export const LoopsRunsRetrieveParams = /* @__PURE__ */ zod.object({
+export const LoopsRunsRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -720,7 +720,7 @@ export const LoopsRunsRetrieveParams = /* @__PURE__ */ zod.object({
export const loopsRunsRetrieveQueryLimitDefault = 50
export const loopsRunsRetrieveQueryLimitMax = 100
-export const LoopsRunsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const LoopsRunsRetrieveQueryParams = () => zod.object({
cursor: zod
.string()
.min(1)
@@ -738,7 +738,7 @@ export const LoopsRunsRetrieveQueryParams = /* @__PURE__ */ zod.object({
* All live public channels plus the requester's personal #me channel when it exists, sorted by name. Listing does not provision; call provision_defaults to create the default channels.
* @summary List channels
*/
-export const TaskChannelsListParams = /* @__PURE__ */ zod.object({
+export const TaskChannelsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -746,7 +746,7 @@ export const TaskChannelsListParams = /* @__PURE__ */ zod.object({
),
})
-export const TaskChannelsListQueryParams = /* @__PURE__ */ zod.object({
+export const TaskChannelsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
@@ -755,7 +755,7 @@ export const TaskChannelsListQueryParams = /* @__PURE__ */ zod.object({
* Returns the existing public channel with the (normalized) name, creating it if needed. A channel created here is starred for the requester unless star is false. The general name returns the team's general space; names that read as a private space ("me", "personal") are rejected.
* @summary Resolve or create a public channel
*/
-export const TaskChannelsCreateParams = /* @__PURE__ */ zod.object({
+export const TaskChannelsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -767,7 +767,7 @@ export const taskChannelsCreateBodyNameMax = 128
export const taskChannelsCreateBodyStarDefault = true
-export const TaskChannelsCreateBody = /* @__PURE__ */ zod
+export const TaskChannelsCreateBody = () => zod
.object({
name: zod
.string()
@@ -789,7 +789,7 @@ export const TaskChannelsCreateBody = /* @__PURE__ */ zod
* name so clients can map channel-like surfaces onto backend channels.
* @summary Get a channel
*/
-export const TaskChannelsRetrieveParams = /* @__PURE__ */ zod.object({
+export const TaskChannelsRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -802,7 +802,7 @@ export const TaskChannelsRetrieveParams = /* @__PURE__ */ zod.object({
* The channel's latest CONTEXT.md instructions. A channel with no published instructions reads as a blank version 0 — publish against base_version 0 to create version 1.
* @summary Get channel instructions
*/
-export const TaskChannelsInstructionsRetrieveParams = /* @__PURE__ */ zod.object({
+export const TaskChannelsInstructionsRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -815,7 +815,7 @@ export const TaskChannelsInstructionsRetrieveParams = /* @__PURE__ */ zod.object
* Publish a new version of the channel's CONTEXT.md instructions. Pass base_version (the version you read) so a concurrent edit is rejected with 409 instead of overwritten.
* @summary Publish channel instructions
*/
-export const TaskChannelsInstructionsUpdateParams = /* @__PURE__ */ zod.object({
+export const TaskChannelsInstructionsUpdateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -828,7 +828,7 @@ export const taskChannelsInstructionsUpdateBodyContentMax = 100000
export const taskChannelsInstructionsUpdateBodyBaseVersionMin = 0
-export const TaskChannelsInstructionsUpdateBody = /* @__PURE__ */ zod
+export const TaskChannelsInstructionsUpdateBody = () => zod
.object({
content: zod
.string()
@@ -848,7 +848,7 @@ export const TaskChannelsInstructionsUpdateBody = /* @__PURE__ */ zod
* Get a list of tasks for the current project, with optional filtering by origin product, stage, organization, repository, created_by, and the workflow (hog_flow_id) that created the task.
* @summary List tasks
*/
-export const TasksListParams = /* @__PURE__ */ zod.object({
+export const TasksListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -863,7 +863,7 @@ export const tasksListQueryLimitMax = 100
export const tasksListQueryOffsetDefault = 0
export const tasksListQueryOffsetMin = 0
-export const TasksListQueryParams = /* @__PURE__ */ zod.object({
+export const TasksListQueryParams = () => zod.object({
all_team_tasks: zod
.boolean()
.default(tasksListQueryAllTeamTasksDefault)
@@ -972,7 +972,7 @@ export const TasksListQueryParams = /* @__PURE__ */ zod.object({
/**
* API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
*/
-export const TasksCreateParams = /* @__PURE__ */ zod.object({
+export const TasksCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -994,7 +994,7 @@ export const tasksCreateBodyBranchMax = 255
export const tasksCreateBodyPendingUserArtifactIdsItemMax = 128
-export const TasksCreateBody = /* @__PURE__ */ zod
+export const TasksCreateBody = () => zod
.object({
title: zod
.string()
@@ -1166,7 +1166,7 @@ export const TasksCreateBody = /* @__PURE__ */ zod
* Retrieve a single task by ID.
* @summary Get task
*/
-export const TasksRetrieveParams = /* @__PURE__ */ zod.object({
+export const TasksRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -1179,7 +1179,7 @@ export const TasksRetrieveParams = /* @__PURE__ */ zod.object({
* Get a list of runs for a specific task.
* @summary List task runs
*/
-export const TasksRunsListParams = /* @__PURE__ */ zod.object({
+export const TasksRunsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1194,7 +1194,7 @@ export const tasksRunsListQueryLimitMax = 100
export const tasksRunsListQueryOffsetDefault = 0
export const tasksRunsListQueryOffsetMin = 0
-export const TasksRunsListQueryParams = /* @__PURE__ */ zod.object({
+export const TasksRunsListQueryParams = () => zod.object({
limit: zod
.number()
.min(1)
@@ -1212,7 +1212,7 @@ export const TasksRunsListQueryParams = /* @__PURE__ */ zod.object({
* Retrieve a single run for a specific task.
* @summary Get task run
*/
-export const TasksRunsRetrieveParams = /* @__PURE__ */ zod.object({
+export const TasksRunsRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -1226,7 +1226,7 @@ export const TasksRunsRetrieveParams = /* @__PURE__ */ zod.object({
* Fetch session log entries for a task run with optional filtering by timestamp, event type, and limit.
* @summary Get filtered task run session logs
*/
-export const TasksRunsSessionLogsRetrieveParams = /* @__PURE__ */ zod.object({
+export const TasksRunsSessionLogsRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -1242,7 +1242,7 @@ export const tasksRunsSessionLogsRetrieveQueryLimitMax = 5000
export const tasksRunsSessionLogsRetrieveQueryOffsetDefault = 0
export const tasksRunsSessionLogsRetrieveQueryOffsetMin = 0
-export const TasksRunsSessionLogsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const TasksRunsSessionLogsRetrieveQueryParams = () => zod.object({
after: zod.iso.datetime({ offset: true }).optional().describe('Only return events after this ISO8601 timestamp'),
event_types: zod.string().min(1).optional().describe('Comma-separated list of event types to include'),
exclude_types: zod.string().min(1).optional().describe('Comma-separated list of event types to exclude'),
diff --git a/services/mcp/src/generated/tracing/api.ts b/services/mcp/src/generated/tracing/api.ts
index 280280911e33..c0218412d046 100644
--- a/services/mcp/src/generated/tracing/api.ts
+++ b/services/mcp/src/generated/tracing/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const TracingSpansAggregateCreateParams = /* @__PURE__ */ zod.object({
+export const TracingSpansAggregateCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -22,7 +22,7 @@ export const tracingSpansAggregateCreateBodyQueryOneLimitMax = 5000
export const tracingSpansAggregateCreateBodyQueryOneOffsetMin = 0
-export const TracingSpansAggregateCreateBody = /* @__PURE__ */ zod.object({
+export const TracingSpansAggregateCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
@@ -128,7 +128,7 @@ export const TracingSpansAggregateCreateBody = /* @__PURE__ */ zod.object({
.describe('The span aggregation query to execute.'),
})
-export const TracingSpansAttributeBreakdownCreateParams = /* @__PURE__ */ zod.object({
+export const TracingSpansAttributeBreakdownCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -140,7 +140,7 @@ export const tracingSpansAttributeBreakdownCreateBodyQueryOneExcludeBreakdownFil
export const tracingSpansAttributeBreakdownCreateBodyQueryOneCompareFilterOneCompareDefault = false
export const tracingSpansAttributeBreakdownCreateBodyQueryOneFilterGroupDefault = []
-export const TracingSpansAttributeBreakdownCreateBody = /* @__PURE__ */ zod.object({
+export const TracingSpansAttributeBreakdownCreateBody = () => zod.object({
query: zod
.object({
breakdownKey: zod
@@ -263,7 +263,7 @@ export const TracingSpansAttributeBreakdownCreateBody = /* @__PURE__ */ zod.obje
.describe('The attribute breakdown query to execute.'),
})
-export const TracingSpansAttributesRetrieveParams = /* @__PURE__ */ zod.object({
+export const TracingSpansAttributesRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -277,7 +277,7 @@ export const tracingSpansAttributesRetrieveQueryOffsetMin = 0
export const tracingSpansAttributesRetrieveQuerySearchValuesDefault = false
-export const TracingSpansAttributesRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const TracingSpansAttributesRetrieveQueryParams = () => zod.object({
attribute_type: zod
.enum(['span_attribute', 'span_resource_attribute'])
.optional()
@@ -304,7 +304,7 @@ export const TracingSpansAttributesRetrieveQueryParams = /* @__PURE__ */ zod.obj
),
})
-export const TracingSpansCountCreateParams = /* @__PURE__ */ zod.object({
+export const TracingSpansCountCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -314,7 +314,7 @@ export const TracingSpansCountCreateParams = /* @__PURE__ */ zod.object({
export const tracingSpansCountCreateBodyQueryOneFilterGroupDefault = []
-export const TracingSpansCountCreateBody = /* @__PURE__ */ zod.object({
+export const TracingSpansCountCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
@@ -392,7 +392,7 @@ export const TracingSpansCountCreateBody = /* @__PURE__ */ zod.object({
.describe('The span count query to execute.'),
})
-export const TracingSpansDurationHistogramCreateParams = /* @__PURE__ */ zod.object({
+export const TracingSpansDurationHistogramCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -403,7 +403,7 @@ export const TracingSpansDurationHistogramCreateParams = /* @__PURE__ */ zod.obj
export const tracingSpansDurationHistogramCreateBodyQueryOneFilterGroupDefault = []
export const tracingSpansDurationHistogramCreateBodyQueryOneRootSpansDefault = true
-export const TracingSpansDurationHistogramCreateBody = /* @__PURE__ */ zod.object({
+export const TracingSpansDurationHistogramCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
@@ -487,7 +487,7 @@ export const TracingSpansDurationHistogramCreateBody = /* @__PURE__ */ zod.objec
.describe('The duration-histogram query to execute.'),
})
-export const TracingSpansLatencyHeatmapCreateParams = /* @__PURE__ */ zod.object({
+export const TracingSpansLatencyHeatmapCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -498,7 +498,7 @@ export const TracingSpansLatencyHeatmapCreateParams = /* @__PURE__ */ zod.object
export const tracingSpansLatencyHeatmapCreateBodyQueryOneFilterGroupDefault = []
export const tracingSpansLatencyHeatmapCreateBodyQueryOneRootSpansDefault = true
-export const TracingSpansLatencyHeatmapCreateBody = /* @__PURE__ */ zod.object({
+export const TracingSpansLatencyHeatmapCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
@@ -582,7 +582,7 @@ export const TracingSpansLatencyHeatmapCreateBody = /* @__PURE__ */ zod.object({
.describe('The latency-heatmap query to execute.'),
})
-export const TracingSpansQueryCreateParams = /* @__PURE__ */ zod.object({
+export const TracingSpansQueryCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -598,7 +598,7 @@ export const tracingSpansQueryCreateBodyQueryOneRootSpansDefault = true
export const tracingSpansQueryCreateBodyQueryOneFlatSpansDefault = false
export const tracingSpansQueryCreateBodyQueryOneExcludeAttributesDefault = false
-export const TracingSpansQueryCreateBody = /* @__PURE__ */ zod.object({
+export const TracingSpansQueryCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
@@ -721,7 +721,7 @@ export const TracingSpansQueryCreateBody = /* @__PURE__ */ zod.object({
.describe('The tracing spans query to execute.'),
})
-export const TracingSpansServiceNamesRetrieveParams = /* @__PURE__ */ zod.object({
+export const TracingSpansServiceNamesRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -729,12 +729,12 @@ export const TracingSpansServiceNamesRetrieveParams = /* @__PURE__ */ zod.object
),
})
-export const TracingSpansServiceNamesRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const TracingSpansServiceNamesRetrieveQueryParams = () => zod.object({
dateRange: zod.string().min(1).optional().describe('JSON-encoded date range, e.g. \'{\"date_from\": \"-1h\"}\'.'),
search: zod.string().min(1).optional().describe('Search filter for service names.'),
})
-export const TracingSpansSparklineCreateParams = /* @__PURE__ */ zod.object({
+export const TracingSpansSparklineCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -745,7 +745,7 @@ export const TracingSpansSparklineCreateParams = /* @__PURE__ */ zod.object({
export const tracingSpansSparklineCreateBodyQueryOneFilterGroupDefault = []
export const tracingSpansSparklineCreateBodyQueryOneRootSpansDefault = false
-export const TracingSpansSparklineCreateBody = /* @__PURE__ */ zod.object({
+export const TracingSpansSparklineCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
@@ -831,7 +831,7 @@ export const TracingSpansSparklineCreateBody = /* @__PURE__ */ zod.object({
export const tracingSpansTraceCreatePathTraceIdRegExp = new RegExp('^[a-zA-Z0-9]+$')
-export const TracingSpansTraceCreateParams = /* @__PURE__ */ zod.object({
+export const TracingSpansTraceCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -843,7 +843,7 @@ export const TracingSpansTraceCreateParams = /* @__PURE__ */ zod.object({
export const tracingSpansTraceCreateBodyExcludeAttributesDefault = false
export const tracingSpansTraceCreateBodyOffsetMin = 0
-export const TracingSpansTraceCreateBody = /* @__PURE__ */ zod.object({
+export const TracingSpansTraceCreateBody = () => zod.object({
dateRange: zod
.object({
date_from: zod
@@ -874,7 +874,7 @@ export const TracingSpansTraceCreateBody = /* @__PURE__ */ zod.object({
),
})
-export const TracingSpansTreeCreateParams = /* @__PURE__ */ zod.object({
+export const TracingSpansTreeCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -885,7 +885,7 @@ export const TracingSpansTreeCreateParams = /* @__PURE__ */ zod.object({
export const tracingSpansTreeCreateBodyQueryOneCompareFilterOneCompareDefault = false
export const tracingSpansTreeCreateBodyQueryOneFilterGroupDefault = []
-export const TracingSpansTreeCreateBody = /* @__PURE__ */ zod.object({
+export const TracingSpansTreeCreateBody = () => zod.object({
query: zod
.object({
spanName: zod
@@ -986,7 +986,7 @@ export const TracingSpansTreeCreateBody = /* @__PURE__ */ zod.object({
.describe('The span call-tree aggregation query to execute.'),
})
-export const TracingSpansValuesRetrieveParams = /* @__PURE__ */ zod.object({
+export const TracingSpansValuesRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -998,7 +998,7 @@ export const tracingSpansValuesRetrieveQueryLimitMax = 100
export const tracingSpansValuesRetrieveQueryOffsetMin = 0
-export const TracingSpansValuesRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const TracingSpansValuesRetrieveQueryParams = () => zod.object({
attribute_type: zod
.enum(['span', 'span_attribute', 'span_resource_attribute'])
.optional()
diff --git a/services/mcp/src/generated/user_interviews/api.ts b/services/mcp/src/generated/user_interviews/api.ts
index 0037b67a6502..685e4aa4605f 100644
--- a/services/mcp/src/generated/user_interviews/api.ts
+++ b/services/mcp/src/generated/user_interviews/api.ts
@@ -11,7 +11,7 @@ import * as zod from 'zod'
/**
* Planned user interview topics: who we want to target and what we want to ask about.
*/
-export const UserInterviewTopicsListParams = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -19,7 +19,7 @@ export const UserInterviewTopicsListParams = /* @__PURE__ */ zod.object({
),
})
-export const UserInterviewTopicsListQueryParams = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
search: zod.string().optional().describe('A search term.'),
@@ -28,7 +28,7 @@ export const UserInterviewTopicsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Planned user interview topics: who we want to target and what we want to ask about.
*/
-export const UserInterviewTopicsCreateParams = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -44,7 +44,7 @@ export const userInterviewTopicsCreateBodyInviteSubjectMax = 255
export const userInterviewTopicsCreateBodyInviteMessageMax = 1000
-export const UserInterviewTopicsCreateBody = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsCreateBody = () => zod.object({
interviewee_emails: zod
.array(zod.string().max(userInterviewTopicsCreateBodyIntervieweeEmailsItemMax))
.optional()
@@ -81,7 +81,7 @@ export const UserInterviewTopicsCreateBody = /* @__PURE__ */ zod.object({
/**
* Planned user interview topics: who we want to target and what we want to ask about.
*/
-export const UserInterviewTopicsRetrieveParams = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this user interview topic.'),
project_id: zod
.string()
@@ -93,7 +93,7 @@ export const UserInterviewTopicsRetrieveParams = /* @__PURE__ */ zod.object({
/**
* Planned user interview topics: who we want to target and what we want to ask about.
*/
-export const UserInterviewTopicsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this user interview topic.'),
project_id: zod
.string()
@@ -110,7 +110,7 @@ export const userInterviewTopicsPartialUpdateBodyInviteSubjectMax = 255
export const userInterviewTopicsPartialUpdateBodyInviteMessageMax = 1000
-export const UserInterviewTopicsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsPartialUpdateBody = () => zod.object({
interviewee_emails: zod
.array(zod.string().max(userInterviewTopicsPartialUpdateBodyIntervieweeEmailsItemMax))
.optional()
@@ -147,7 +147,7 @@ export const UserInterviewTopicsPartialUpdateBody = /* @__PURE__ */ zod.object({
/**
* Add a single interviewee to this topic. Email-shaped identifiers (including the `Display Name <email@host>` form) are appended to `interviewee_emails`; everything else is appended to `interviewee_distinct_ids`. Idempotent — adding an identifier that's already present leaves the topic unchanged. Returns the updated topic.
*/
-export const UserInterviewTopicsAddIntervieweeCreateParams = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsAddIntervieweeCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this user interview topic.'),
project_id: zod
.string()
@@ -158,7 +158,7 @@ export const UserInterviewTopicsAddIntervieweeCreateParams = /* @__PURE__ */ zod
export const userInterviewTopicsAddIntervieweeCreateBodyIdentifierMax = 400
-export const UserInterviewTopicsAddIntervieweeCreateBody = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsAddIntervieweeCreateBody = () => zod.object({
identifier: zod
.string()
.max(userInterviewTopicsAddIntervieweeCreateBodyIdentifierMax)
@@ -170,7 +170,7 @@ export const UserInterviewTopicsAddIntervieweeCreateBody = /* @__PURE__ */ zod.o
/**
* Generate one public interview link per targeted interviewee. Materializes an IntervieweeContext row for every identifier on the topic (without overwriting existing per-person context), and an enabled SharingConfiguration with a unique access token. The URL resolves to the public interview viewer with no PostHog auth required.
*/
-export const UserInterviewTopicsGenerateLinksCreateParams = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsGenerateLinksCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this user interview topic.'),
project_id: zod
.string()
@@ -182,7 +182,7 @@ export const UserInterviewTopicsGenerateLinksCreateParams = /* @__PURE__ */ zod.
/**
* Same materialization as generate_links, returned as a downloadable CSV. Intended for users who want to mail-merge the per-person interview links into their own email tooling.
*/
-export const UserInterviewTopicsLinksCsvCreateParams = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsLinksCsvCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this user interview topic.'),
project_id: zod
.string()
@@ -194,7 +194,7 @@ export const UserInterviewTopicsLinksCsvCreateParams = /* @__PURE__ */ zod.objec
/**
* Render the invite email exactly as a specific targeted interviewee would receive it — personalized subject and body — without sending anything and without creating or reading any share links. Pass `interviewee_identifier` to preview for a particular person, or omit it to preview for the first targeted interviewee. The body always shows an illustrative placeholder link (`is_preview_link: true`), never a live interview URL.
*/
-export const UserInterviewTopicsPreviewInviteCreateParams = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsPreviewInviteCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this user interview topic.'),
project_id: zod
.string()
@@ -205,7 +205,7 @@ export const UserInterviewTopicsPreviewInviteCreateParams = /* @__PURE__ */ zod.
export const userInterviewTopicsPreviewInviteCreateBodyIntervieweeIdentifierMax = 400
-export const UserInterviewTopicsPreviewInviteCreateBody = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsPreviewInviteCreateBody = () => zod.object({
interviewee_identifier: zod
.string()
.max(userInterviewTopicsPreviewInviteCreateBodyIntervieweeIdentifierMax)
@@ -218,7 +218,7 @@ export const UserInterviewTopicsPreviewInviteCreateBody = /* @__PURE__ */ zod.ob
/**
* Remove an interviewee from this topic. Drops the identifier from both `interviewee_emails` and `interviewee_distinct_ids`, and disables any active SharingConfiguration linked to an IntervieweeContext for that identifier on this topic so the removed person can no longer open their interview link. Idempotent — removing an identifier that isn't present is a no-op. Returns the updated topic.
*/
-export const UserInterviewTopicsRemoveIntervieweeCreateParams = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsRemoveIntervieweeCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this user interview topic.'),
project_id: zod
.string()
@@ -229,7 +229,7 @@ export const UserInterviewTopicsRemoveIntervieweeCreateParams = /* @__PURE__ */
export const userInterviewTopicsRemoveIntervieweeCreateBodyIdentifierMax = 400
-export const UserInterviewTopicsRemoveIntervieweeCreateBody = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsRemoveIntervieweeCreateBody = () => zod.object({
identifier: zod
.string()
.max(userInterviewTopicsRemoveIntervieweeCreateBodyIdentifierMax)
@@ -241,7 +241,7 @@ export const UserInterviewTopicsRemoveIntervieweeCreateBody = /* @__PURE__ */ zo
/**
* Generate (if needed) and email a personalized public interview link to every targeted interviewee on this topic whose identifier is an email address. Distinct-ID-only interviewees are skipped and surfaced in the response. Each invite is keyed on the underlying SharingConfiguration so re-runs after token rotation produce a fresh send.
*/
-export const UserInterviewTopicsSendInvitesCreateParams = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsSendInvitesCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this user interview topic.'),
project_id: zod
.string()
@@ -254,7 +254,7 @@ export const userInterviewTopicsSendInvitesCreateBodySubjectMax = 200
export const userInterviewTopicsSendInvitesCreateBodySendAsyncDefault = true
-export const UserInterviewTopicsSendInvitesCreateBody = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsSendInvitesCreateBody = () => zod.object({
subject: zod
.string()
.max(userInterviewTopicsSendInvitesCreateBodySubjectMax)
@@ -277,7 +277,7 @@ export const UserInterviewTopicsSendInvitesCreateBody = /* @__PURE__ */ zod.obje
/**
* Per-interviewee extra context for a user interview topic. At most one row per (topic, interviewee_identifier).
*/
-export const UserInterviewTopicsIntervieweesListParams = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsIntervieweesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -286,7 +286,7 @@ export const UserInterviewTopicsIntervieweesListParams = /* @__PURE__ */ zod.obj
topic_id: zod.string(),
})
-export const UserInterviewTopicsIntervieweesListQueryParams = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsIntervieweesListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
@@ -294,7 +294,7 @@ export const UserInterviewTopicsIntervieweesListQueryParams = /* @__PURE__ */ zo
/**
* Per-interviewee extra context for a user interview topic. At most one row per (topic, interviewee_identifier).
*/
-export const UserInterviewTopicsIntervieweesCreateParams = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsIntervieweesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -307,7 +307,7 @@ export const userInterviewTopicsIntervieweesCreateBodyIntervieweeIdentifierMax =
export const userInterviewTopicsIntervieweesCreateBodyAgentContextMax = 10000
-export const UserInterviewTopicsIntervieweesCreateBody = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsIntervieweesCreateBody = () => zod.object({
interviewee_identifier: zod
.string()
.max(userInterviewTopicsIntervieweesCreateBodyIntervieweeIdentifierMax)
@@ -325,7 +325,7 @@ export const UserInterviewTopicsIntervieweesCreateBody = /* @__PURE__ */ zod.obj
/**
* Per-interviewee extra context for a user interview topic. At most one row per (topic, interviewee_identifier).
*/
-export const UserInterviewTopicsIntervieweesPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsIntervieweesPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this interviewee context.'),
project_id: zod
.string()
@@ -339,7 +339,7 @@ export const userInterviewTopicsIntervieweesPartialUpdateBodyIntervieweeIdentifi
export const userInterviewTopicsIntervieweesPartialUpdateBodyAgentContextMax = 10000
-export const UserInterviewTopicsIntervieweesPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsIntervieweesPartialUpdateBody = () => zod.object({
interviewee_identifier: zod
.string()
.max(userInterviewTopicsIntervieweesPartialUpdateBodyIntervieweeIdentifierMax)
@@ -359,7 +359,7 @@ export const UserInterviewTopicsIntervieweesPartialUpdateBody = /* @__PURE__ */
/**
* Per-interviewee extra context for a user interview topic. At most one row per (topic, interviewee_identifier).
*/
-export const UserInterviewTopicsIntervieweesDestroyParams = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsIntervieweesDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this interviewee context.'),
project_id: zod
.string()
@@ -372,7 +372,7 @@ export const UserInterviewTopicsIntervieweesDestroyParams = /* @__PURE__ */ zod.
/**
* Create up to 500 interviewee context rows for a topic in a single request. Rows whose (topic, interviewee_identifier) already exists are skipped — the response surfaces an `inserted_count`, a `skipped_count`, and the `skipped_identifiers` so the caller can reconcile. Items must have unique `interviewee_identifier` values within the batch.
*/
-export const UserInterviewTopicsIntervieweesBulkCreateParams = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsIntervieweesBulkCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -385,7 +385,7 @@ export const userInterviewTopicsIntervieweesBulkCreateBodyItemsItemIntervieweeId
export const userInterviewTopicsIntervieweesBulkCreateBodyItemsItemAgentContextMax = 10000
-export const UserInterviewTopicsIntervieweesBulkCreateBody = /* @__PURE__ */ zod.object({
+export const UserInterviewTopicsIntervieweesBulkCreateBody = () => zod.object({
items: zod
.array(
zod.object({
@@ -408,7 +408,7 @@ export const UserInterviewTopicsIntervieweesBulkCreateBody = /* @__PURE__ */ zod
),
})
-export const UserInterviewsListParams = /* @__PURE__ */ zod.object({
+export const UserInterviewsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -416,7 +416,7 @@ export const UserInterviewsListParams = /* @__PURE__ */ zod.object({
),
})
-export const UserInterviewsListQueryParams = /* @__PURE__ */ zod.object({
+export const UserInterviewsListQueryParams = () => zod.object({
classifications: zod
.string()
.optional()
@@ -428,7 +428,7 @@ export const UserInterviewsListQueryParams = /* @__PURE__ */ zod.object({
topic: zod.string().optional(),
})
-export const UserInterviewsRetrieveParams = /* @__PURE__ */ zod.object({
+export const UserInterviewsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this user interview.'),
project_id: zod
.string()
@@ -437,7 +437,7 @@ export const UserInterviewsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const UserInterviewsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const UserInterviewsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this user interview.'),
project_id: zod
.string()
@@ -448,7 +448,7 @@ export const UserInterviewsPartialUpdateParams = /* @__PURE__ */ zod.object({
export const userInterviewsPartialUpdateBodyIntervieweeEmailsItemMax = 254
-export const UserInterviewsPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const UserInterviewsPartialUpdateBody = () => zod.object({
interviewee_emails: zod.array(zod.string().max(userInterviewsPartialUpdateBodyIntervieweeEmailsItemMax)).optional(),
summary: zod.string().optional(),
classifications: zod
@@ -464,7 +464,7 @@ export const UserInterviewsPartialUpdateBody = /* @__PURE__ */ zod.object({
* Embed `query` with the same model used to index interview transcripts and summaries, then return the top matches by cosine distance. Each match is a single (interview, document_type) pair — an interview can appear up to twice if both its transcript and summary score above other interviews. Useful for surfacing relevant interview snippets in natural language, without exact keyword matches.
* @summary Search interview responses by semantic similarity
*/
-export const UserInterviewsSearchCreateParams = /* @__PURE__ */ zod.object({
+export const UserInterviewsSearchCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -476,7 +476,7 @@ export const userInterviewsSearchCreateBodyQueryMax = 2000
export const userInterviewsSearchCreateBodyLimitMax = 50
-export const UserInterviewsSearchCreateBody = /* @__PURE__ */ zod.object({
+export const UserInterviewsSearchCreateBody = () => zod.object({
query: zod
.string()
.max(userInterviewsSearchCreateBodyQueryMax)
diff --git a/services/mcp/src/generated/visual_review/api.ts b/services/mcp/src/generated/visual_review/api.ts
index 4ca950937a23..dedb6f457ec7 100644
--- a/services/mcp/src/generated/visual_review/api.ts
+++ b/services/mcp/src/generated/visual_review/api.ts
@@ -11,7 +11,7 @@ import * as zod from 'zod'
/**
* List all projects for the team.
*/
-export const VisualReviewReposListParams = /* @__PURE__ */ zod.object({
+export const VisualReviewReposListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -19,7 +19,7 @@ export const VisualReviewReposListParams = /* @__PURE__ */ zod.object({
),
})
-export const VisualReviewReposListQueryParams = /* @__PURE__ */ zod.object({
+export const VisualReviewReposListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
@@ -27,7 +27,7 @@ export const VisualReviewReposListQueryParams = /* @__PURE__ */ zod.object({
/**
* Get a repo by ID.
*/
-export const VisualReviewReposRetrieveParams = /* @__PURE__ */ zod.object({
+export const VisualReviewReposRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -39,7 +39,7 @@ export const VisualReviewReposRetrieveParams = /* @__PURE__ */ zod.object({
/**
* Snapshots in a repo whose rendering cannot be trusted: those that failed the gate or were absorbed by a toleration on a recent default-branch run, and those under an active quarantine. Everything else is omitted, so this is far smaller than the baselines universe; `totals.tracked` gives the full denominator. Each entry carries the share of the last 7 days of default-branch runs that failed the gate (`hard_rate`) and the share a toleration absorbed (`soft_rate`), plus `headroom`, the fraction of the diff threshold its worst absorbed run leaves free. Capped at 2000 entries, which sets `truncated`. Filtering, faceting and search are done client-side; this endpoint takes no filter query params.
*/
-export const VisualReviewReposFlakinessRetrieveParams = /* @__PURE__ */ zod.object({
+export const VisualReviewReposFlakinessRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -51,7 +51,7 @@ export const VisualReviewReposFlakinessRetrieveParams = /* @__PURE__ */ zod.obje
/**
* List quarantined identifiers. Without filter: active only. With identifier: full history.
*/
-export const VisualReviewReposQuarantineListParams = /* @__PURE__ */ zod.object({
+export const VisualReviewReposQuarantineListParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -60,7 +60,7 @@ export const VisualReviewReposQuarantineListParams = /* @__PURE__ */ zod.object(
),
})
-export const VisualReviewReposQuarantineListQueryParams = /* @__PURE__ */ zod.object({
+export const VisualReviewReposQuarantineListQueryParams = () => zod.object({
identifier: zod.string().optional().describe('Filter by identifier (returns full history)'),
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
@@ -70,7 +70,7 @@ export const VisualReviewReposQuarantineListQueryParams = /* @__PURE__ */ zod.ob
/**
* List runs in this repo, optionally filtered by review state and free-text search.
*/
-export const VisualReviewReposRunsListParams = /* @__PURE__ */ zod.object({
+export const VisualReviewReposRunsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -79,7 +79,7 @@ export const VisualReviewReposRunsListParams = /* @__PURE__ */ zod.object({
repo_id: zod.string(),
})
-export const VisualReviewReposRunsListQueryParams = /* @__PURE__ */ zod.object({
+export const VisualReviewReposRunsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
review_state: zod.string().optional().describe('Filter by review state'),
@@ -89,7 +89,7 @@ export const VisualReviewReposRunsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Review state counts for runs in this repo.
*/
-export const VisualReviewReposRunsCountsRetrieveParams = /* @__PURE__ */ zod.object({
+export const VisualReviewReposRunsCountsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -101,7 +101,7 @@ export const VisualReviewReposRunsCountsRetrieveParams = /* @__PURE__ */ zod.obj
/**
* List runs for the team, optionally filtered by review state, PR number, commit SHA, branch, or free-text search.
*/
-export const VisualReviewRunsListParams = /* @__PURE__ */ zod.object({
+export const VisualReviewRunsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -109,7 +109,7 @@ export const VisualReviewRunsListParams = /* @__PURE__ */ zod.object({
),
})
-export const VisualReviewRunsListQueryParams = /* @__PURE__ */ zod.object({
+export const VisualReviewRunsListQueryParams = () => zod.object({
branch: zod.string().optional().describe('Filter by branch name'),
commit_sha: zod.string().optional().describe('Filter by full commit SHA'),
limit: zod.number().optional().describe('Number of results to return per page.'),
@@ -122,7 +122,7 @@ export const VisualReviewRunsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Get run status and summary.
*/
-export const VisualReviewRunsRetrieveParams = /* @__PURE__ */ zod.object({
+export const VisualReviewRunsRetrieveParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -139,7 +139,7 @@ export const VisualReviewRunsRetrieveParams = /* @__PURE__ */ zod.object({
* snapshot too: a quarantined NEW snapshot approved here is committed by finalize,
* which gives a quarantined story a baseline entry without lifting the quarantine.
*/
-export const VisualReviewRunsApproveCreateParams = /* @__PURE__ */ zod.object({
+export const VisualReviewRunsApproveCreateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -148,7 +148,7 @@ export const VisualReviewRunsApproveCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const VisualReviewRunsApproveCreateBody = /* @__PURE__ */ zod.object({
+export const VisualReviewRunsApproveCreateBody = () => zod.object({
snapshots: zod
.array(
zod.object({
@@ -175,7 +175,7 @@ export const VisualReviewRunsApproveCreateBody = /* @__PURE__ */ zod.object({
* With commit_to_github=false the server returns the signed baseline YAML instead of
* committing it.
*/
-export const VisualReviewRunsFinalizeCreateParams = /* @__PURE__ */ zod.object({
+export const VisualReviewRunsFinalizeCreateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -188,7 +188,7 @@ export const visualReviewRunsFinalizeCreateBodyApproveAllDefault = false
export const visualReviewRunsFinalizeCreateBodyCommitToGithubDefault = true
export const visualReviewRunsFinalizeCreateBodyAddImagesToCommentOnPrDefault = false
-export const VisualReviewRunsFinalizeCreateBody = /* @__PURE__ */ zod.object({
+export const VisualReviewRunsFinalizeCreateBody = () => zod.object({
approve_all: zod
.boolean()
.default(visualReviewRunsFinalizeCreateBodyApproveAllDefault)
@@ -212,7 +212,7 @@ export const VisualReviewRunsFinalizeCreateBody = /* @__PURE__ */ zod.object({
/**
* Recent change history for a snapshot identifier across runs.
*/
-export const VisualReviewRunsSnapshotHistoryListParams = /* @__PURE__ */ zod.object({
+export const VisualReviewRunsSnapshotHistoryListParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -221,7 +221,7 @@ export const VisualReviewRunsSnapshotHistoryListParams = /* @__PURE__ */ zod.obj
),
})
-export const VisualReviewRunsSnapshotHistoryListQueryParams = /* @__PURE__ */ zod.object({
+export const VisualReviewRunsSnapshotHistoryListQueryParams = () => zod.object({
identifier: zod.string().describe('Snapshot identifier'),
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
@@ -230,7 +230,7 @@ export const VisualReviewRunsSnapshotHistoryListQueryParams = /* @__PURE__ */ zo
/**
* Get a run's snapshots with diff results, excluding quarantined ones by default.
*/
-export const VisualReviewRunsSnapshotsListParams = /* @__PURE__ */ zod.object({
+export const VisualReviewRunsSnapshotsListParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -239,7 +239,7 @@ export const VisualReviewRunsSnapshotsListParams = /* @__PURE__ */ zod.object({
),
})
-export const VisualReviewRunsSnapshotsListQueryParams = /* @__PURE__ */ zod.object({
+export const VisualReviewRunsSnapshotsListQueryParams = () => zod.object({
include_quarantined: zod
.boolean()
.optional()
@@ -253,7 +253,7 @@ export const VisualReviewRunsSnapshotsListQueryParams = /* @__PURE__ */ zod.obje
/**
* Mark a changed snapshot as a known tolerated alternate.
*/
-export const VisualReviewRunsTolerateCreateParams = /* @__PURE__ */ zod.object({
+export const VisualReviewRunsTolerateCreateParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -262,7 +262,7 @@ export const VisualReviewRunsTolerateCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const VisualReviewRunsTolerateCreateBody = /* @__PURE__ */ zod.object({
+export const VisualReviewRunsTolerateCreateBody = () => zod.object({
snapshot_id: zod
.string()
.describe(
@@ -273,7 +273,7 @@ export const VisualReviewRunsTolerateCreateBody = /* @__PURE__ */ zod.object({
/**
* List known tolerated hashes for a snapshot identifier.
*/
-export const VisualReviewRunsToleratedHashesListParams = /* @__PURE__ */ zod.object({
+export const VisualReviewRunsToleratedHashesListParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -282,7 +282,7 @@ export const VisualReviewRunsToleratedHashesListParams = /* @__PURE__ */ zod.obj
),
})
-export const VisualReviewRunsToleratedHashesListQueryParams = /* @__PURE__ */ zod.object({
+export const VisualReviewRunsToleratedHashesListQueryParams = () => zod.object({
identifier: zod.string().describe('Snapshot identifier'),
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
@@ -291,7 +291,7 @@ export const VisualReviewRunsToleratedHashesListQueryParams = /* @__PURE__ */ zo
/**
* Review state counts for the runs list.
*/
-export const VisualReviewRunsCountsRetrieveParams = /* @__PURE__ */ zod.object({
+export const VisualReviewRunsCountsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
diff --git a/services/mcp/src/generated/warehouse_sources/api.ts b/services/mcp/src/generated/warehouse_sources/api.ts
index 0c15497e8af2..e68e3799f2e3 100644
--- a/services/mcp/src/generated/warehouse_sources/api.ts
+++ b/services/mcp/src/generated/warehouse_sources/api.ts
@@ -14,7 +14,7 @@ import * as zod from 'zod'
* A destination can be attached to several sources, or to a single table on a source.
* Credentials come from an integration, so one connection can be reused across syncs.
*/
-export const ExternalDataDestinationsListParams = /* @__PURE__ */ zod.object({
+export const ExternalDataDestinationsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -22,7 +22,7 @@ export const ExternalDataDestinationsListParams = /* @__PURE__ */ zod.object({
),
})
-export const ExternalDataDestinationsListQueryParams = /* @__PURE__ */ zod.object({
+export const ExternalDataDestinationsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
@@ -33,7 +33,7 @@ export const ExternalDataDestinationsListQueryParams = /* @__PURE__ */ zod.objec
* A destination can be attached to several sources, or to a single table on a source.
* Credentials come from an integration, so one connection can be reused across syncs.
*/
-export const ExternalDataDestinationsRetrieveParams = /* @__PURE__ */ zod.object({
+export const ExternalDataDestinationsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data destination.'),
project_id: zod
.string()
@@ -42,7 +42,7 @@ export const ExternalDataDestinationsRetrieveParams = /* @__PURE__ */ zod.object
),
})
-export const ExternalDataSchemasListParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSchemasListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -50,13 +50,13 @@ export const ExternalDataSchemasListParams = /* @__PURE__ */ zod.object({
),
})
-export const ExternalDataSchemasListQueryParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSchemasListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
search: zod.string().optional().describe('A search term.'),
})
-export const ExternalDataSchemasRetrieveParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSchemasRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data schema.'),
project_id: zod
.string()
@@ -65,7 +65,7 @@ export const ExternalDataSchemasRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const ExternalDataSchemasPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSchemasPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data schema.'),
project_id: zod
.string()
@@ -79,7 +79,7 @@ export const externalDataSchemasPartialUpdateBodyIncrementalFieldLookbackSeconds
export const externalDataSchemasPartialUpdateBodyApiVersionMax = 128
-export const ExternalDataSchemasPartialUpdateBody = /* @__PURE__ */ zod
+export const ExternalDataSchemasPartialUpdateBody = () => zod
.object({
should_sync: zod.boolean().optional(),
sync_type: zod
@@ -175,7 +175,7 @@ export const ExternalDataSchemasPartialUpdateBody = /* @__PURE__ */ zod
})
.describe('A schema of an external data source: its sync configuration and the warehouse table it syncs into.')
-export const ExternalDataSchemasCancelCreateParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSchemasCancelCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data schema.'),
project_id: zod
.string()
@@ -184,7 +184,7 @@ export const ExternalDataSchemasCancelCreateParams = /* @__PURE__ */ zod.object(
),
})
-export const ExternalDataSchemasDeleteDataDestroyParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSchemasDeleteDataDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data schema.'),
project_id: zod
.string()
@@ -198,7 +198,7 @@ export const ExternalDataSchemasDeleteDataDestroyParams = /* @__PURE__ */ zod.ob
*
* Send `destination_ids: null` to clear the override so the table follows its source again.
*/
-export const ExternalDataSchemasDestinationsRetrieveParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSchemasDestinationsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data schema.'),
project_id: zod
.string()
@@ -207,7 +207,7 @@ export const ExternalDataSchemasDestinationsRetrieveParams = /* @__PURE__ */ zod
),
})
-export const ExternalDataSchemasIncrementalFieldsCreateParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSchemasIncrementalFieldsCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data schema.'),
project_id: zod
.string()
@@ -221,7 +221,7 @@ export const externalDataSchemasIncrementalFieldsCreateBodyIncrementalFieldLookb
export const externalDataSchemasIncrementalFieldsCreateBodyApiVersionMax = 128
-export const ExternalDataSchemasIncrementalFieldsCreateBody = /* @__PURE__ */ zod
+export const ExternalDataSchemasIncrementalFieldsCreateBody = () => zod
.object({
should_sync: zod.boolean().optional(),
sync_type: zod
@@ -317,7 +317,7 @@ export const ExternalDataSchemasIncrementalFieldsCreateBody = /* @__PURE__ */ zo
})
.describe('A schema of an external data source: its sync configuration and the warehouse table it syncs into.')
-export const ExternalDataSchemasReloadCreateParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSchemasReloadCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data schema.'),
project_id: zod
.string()
@@ -326,7 +326,7 @@ export const ExternalDataSchemasReloadCreateParams = /* @__PURE__ */ zod.object(
),
})
-export const ExternalDataSchemasResyncCreateParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSchemasResyncCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data schema.'),
project_id: zod
.string()
@@ -338,7 +338,7 @@ export const ExternalDataSchemasResyncCreateParams = /* @__PURE__ */ zod.object(
/**
* Create, Read, Update and Delete External data Sources.
*/
-export const ExternalDataSourcesListParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -346,7 +346,7 @@ export const ExternalDataSourcesListParams = /* @__PURE__ */ zod.object({
),
})
-export const ExternalDataSourcesListQueryParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
search: zod.string().optional().describe('A search term.'),
@@ -355,7 +355,7 @@ export const ExternalDataSourcesListQueryParams = /* @__PURE__ */ zod.object({
/**
* Create, Read, Update and Delete External data Sources.
*/
-export const ExternalDataSourcesCreateParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -370,7 +370,7 @@ export const externalDataSourcesCreateBodyDescriptionMax = 400
export const externalDataSourcesCreateBodyAccessMethodDefault = `warehouse`
export const externalDataSourcesCreateBodyDirectQueryEnabledDefault = false
-export const ExternalDataSourcesCreateBody = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesCreateBody = () => zod.object({
source_type: zod
.enum([
'Ashby',
@@ -1746,7 +1746,7 @@ export const ExternalDataSourcesCreateBody = /* @__PURE__ */ zod.object({
/**
* Create, Read, Update and Delete External data Sources.
*/
-export const ExternalDataSourcesRetrieveParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data source.'),
project_id: zod
.string()
@@ -1758,7 +1758,7 @@ export const ExternalDataSourcesRetrieveParams = /* @__PURE__ */ zod.object({
/**
* Create, Read, Update and Delete External data Sources.
*/
-export const ExternalDataSourcesPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data source.'),
project_id: zod
.string()
@@ -1775,7 +1775,7 @@ export const externalDataSourcesPartialUpdateBodyAutoSyncSchemaPatternsItemMax =
export const externalDataSourcesPartialUpdateBodyAutoSyncSchemaPatternsMax = 100
-export const ExternalDataSourcesPartialUpdateBody = /* @__PURE__ */ zod
+export const ExternalDataSourcesPartialUpdateBody = () => zod
.object({
created_via: zod
.union([
@@ -1825,7 +1825,7 @@ export const ExternalDataSourcesPartialUpdateBody = /* @__PURE__ */ zod
/**
* Create, Read, Update and Delete External data Sources.
*/
-export const ExternalDataSourcesDestroyParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesDestroyParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data source.'),
project_id: zod
.string()
@@ -1837,7 +1837,7 @@ export const ExternalDataSourcesDestroyParams = /* @__PURE__ */ zod.object({
/**
* Create, Read, Update and Delete External data Sources.
*/
-export const ExternalDataSourcesCreateWebhookCreateParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesCreateWebhookCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data source.'),
project_id: zod
.string()
@@ -1854,7 +1854,7 @@ export const externalDataSourcesCreateWebhookCreateBodyAutoSyncSchemaPatternsIte
export const externalDataSourcesCreateWebhookCreateBodyAutoSyncSchemaPatternsMax = 100
-export const ExternalDataSourcesCreateWebhookCreateBody = /* @__PURE__ */ zod
+export const ExternalDataSourcesCreateWebhookCreateBody = () => zod
.object({
created_via: zod
.union([
@@ -1904,7 +1904,7 @@ export const ExternalDataSourcesCreateWebhookCreateBody = /* @__PURE__ */ zod
/**
* Create, Read, Update and Delete External data Sources.
*/
-export const ExternalDataSourcesDeleteWebhookCreateParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesDeleteWebhookCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data source.'),
project_id: zod
.string()
@@ -1921,7 +1921,7 @@ export const externalDataSourcesDeleteWebhookCreateBodyAutoSyncSchemaPatternsIte
export const externalDataSourcesDeleteWebhookCreateBodyAutoSyncSchemaPatternsMax = 100
-export const ExternalDataSourcesDeleteWebhookCreateBody = /* @__PURE__ */ zod
+export const ExternalDataSourcesDeleteWebhookCreateBody = () => zod
.object({
created_via: zod
.union([
@@ -1973,7 +1973,7 @@ export const ExternalDataSourcesDeleteWebhookCreateBody = /* @__PURE__ */ zod
*
* A table with its own override ignores this set until the override is cleared.
*/
-export const ExternalDataSourcesDestinationsRetrieveParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesDestinationsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data source.'),
project_id: zod
.string()
@@ -1985,7 +1985,7 @@ export const ExternalDataSourcesDestinationsRetrieveParams = /* @__PURE__ */ zod
/**
* Fetch current schema/table list from the source and create any new ExternalDataSchema rows (no data sync).
*/
-export const ExternalDataSourcesRefreshSchemasCreateParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesRefreshSchemasCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data source.'),
project_id: zod
.string()
@@ -1998,7 +1998,7 @@ export const externalDataSourcesRefreshSchemasCreateBodyAutoSyncSchemaPatternsIt
export const externalDataSourcesRefreshSchemasCreateBodyAutoSyncSchemaPatternsMax = 100
-export const ExternalDataSourcesRefreshSchemasCreateBody = /* @__PURE__ */ zod
+export const ExternalDataSourcesRefreshSchemasCreateBody = () => zod
.object({
created_via: zod
.union([
@@ -2043,7 +2043,7 @@ export const ExternalDataSourcesRefreshSchemasCreateBody = /* @__PURE__ */ zod
/**
* Create, Read, Update and Delete External data Sources.
*/
-export const ExternalDataSourcesReloadCreateParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesReloadCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data source.'),
project_id: zod
.string()
@@ -2056,7 +2056,7 @@ export const externalDataSourcesReloadCreateBodyAutoSyncSchemaPatternsItemMax =
export const externalDataSourcesReloadCreateBodyAutoSyncSchemaPatternsMax = 100
-export const ExternalDataSourcesReloadCreateBody = /* @__PURE__ */ zod
+export const ExternalDataSourcesReloadCreateBody = () => zod
.object({
created_via: zod
.union([
@@ -2110,7 +2110,7 @@ export const ExternalDataSourcesReloadCreateBody = /* @__PURE__ */ zod
* Idempotent: safe to retry after a partial failure. Concurrent repairs of the same
* source are rejected with a 409.
*/
-export const ExternalDataSourcesRepairCdcCreateParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesRepairCdcCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data source.'),
project_id: zod
.string()
@@ -2122,7 +2122,7 @@ export const ExternalDataSourcesRepairCdcCreateParams = /* @__PURE__ */ zod.obje
/**
* Create, Read, Update and Delete External data Sources.
*/
-export const ExternalDataSourcesUpdateWebhookInputsCreateParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesUpdateWebhookInputsCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data source.'),
project_id: zod
.string()
@@ -2139,7 +2139,7 @@ export const externalDataSourcesUpdateWebhookInputsCreateBodyAutoSyncSchemaPatte
export const externalDataSourcesUpdateWebhookInputsCreateBodyAutoSyncSchemaPatternsMax = 100
-export const ExternalDataSourcesUpdateWebhookInputsCreateBody = /* @__PURE__ */ zod
+export const ExternalDataSourcesUpdateWebhookInputsCreateBody = () => zod
.object({
created_via: zod
.union([
@@ -2189,7 +2189,7 @@ export const ExternalDataSourcesUpdateWebhookInputsCreateBody = /* @__PURE__ */
/**
* Create, Read, Update and Delete External data Sources.
*/
-export const ExternalDataSourcesWebhookInfoRetrieveParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesWebhookInfoRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this external data source.'),
project_id: zod
.string()
@@ -2204,7 +2204,7 @@ export const ExternalDataSourcesWebhookInfoRetrieveParams = /* @__PURE__ */ zod.
* Used by the source wizard to surface ✅/❌ checks before source creation,
* and by the self-managed setup popup to verify user-created publications.
*/
-export const ExternalDataSourcesCheckCdcPrerequisitesCreateParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesCheckCdcPrerequisitesCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2220,7 +2220,7 @@ export const ExternalDataSourcesCheckCdcPrerequisitesCreateParams = /* @__PURE__
* secrets never pass through the agent, and the agent finishes setup afterwards by passing the stored
* credential id to data-warehouse-source-setup.
*/
-export const ExternalDataSourcesConnectLinkRetrieveParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesConnectLinkRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2228,7 +2228,7 @@ export const ExternalDataSourcesConnectLinkRetrieveParams = /* @__PURE__ */ zod.
),
})
-export const ExternalDataSourcesConnectLinkRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesConnectLinkRetrieveQueryParams = () => zod.object({
source_type: zod
.string()
.describe("The source type to generate a connect link for (e.g. 'Stripe', 'Postgres', 'Hubspot')."),
@@ -2237,7 +2237,7 @@ export const ExternalDataSourcesConnectLinkRetrieveQueryParams = /* @__PURE__ */
/**
* Create, Read, Update and Delete External data Sources.
*/
-export const ExternalDataSourcesConnectionsListParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesConnectionsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2256,7 +2256,7 @@ export const ExternalDataSourcesConnectionsListParams = /* @__PURE__ */ zod.obje
* defaults stay in place. For fine-grained table/sync control, use the lower-level
* `database_schema` + `create` flow instead.
*/
-export const ExternalDataSourcesSetupCreateParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesSetupCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -2270,7 +2270,7 @@ export const externalDataSourcesSetupCreateBodyDescriptionMax = 400
export const externalDataSourcesSetupCreateBodyDirectQueryEnabledDefault = false
-export const ExternalDataSourcesSetupCreateBody = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesSetupCreateBody = () => zod.object({
source_type: zod
.enum([
'Ashby',
@@ -3640,7 +3640,7 @@ export const ExternalDataSourcesSetupCreateBody = /* @__PURE__ */ zod.object({
* they expire. Newest first, so after a user confirms they've finished the connect page, the
* first entry for the source type is the one to pass to `setup`.
*/
-export const ExternalDataSourcesStoredCredentialsListParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesStoredCredentialsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -3648,7 +3648,7 @@ export const ExternalDataSourcesStoredCredentialsListParams = /* @__PURE__ */ zo
),
})
-export const ExternalDataSourcesStoredCredentialsListQueryParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesStoredCredentialsListQueryParams = () => zod.object({
search: zod.string().optional().describe('A search term.'),
source_type: zod
.string()
@@ -3659,7 +3659,7 @@ export const ExternalDataSourcesStoredCredentialsListQueryParams = /* @__PURE__
/**
* Create, Read, Update and Delete External data Sources.
*/
-export const ExternalDataSourcesWizardRetrieveParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesWizardRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -3667,7 +3667,7 @@ export const ExternalDataSourcesWizardRetrieveParams = /* @__PURE__ */ zod.objec
),
})
-export const ExternalDataSourcesWizardRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const ExternalDataSourcesWizardRetrieveQueryParams = () => zod.object({
source_type: zod
.string()
.optional()
diff --git a/services/mcp/src/generated/web_analytics/api.ts b/services/mcp/src/generated/web_analytics/api.ts
index dd486128fbda..274df194c130 100644
--- a/services/mcp/src/generated/web_analytics/api.ts
+++ b/services/mcp/src/generated/web_analytics/api.ts
@@ -11,7 +11,7 @@ import * as zod from 'zod'
/**
* Aggregated heatmap interactions for a page. For type 'click'/'rageclick'/'mousemove' each result is a point with relative x, absolute client-y, and a count. For type 'scrolldepth' the response is scroll-depth buckets instead (cumulative reach down the page).
*/
-export const HeatmapsListParams = /* @__PURE__ */ zod.object({
+export const HeatmapsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -33,7 +33,7 @@ export const heatmapsListQueryOffsetMax = 1000000
export const heatmapsListQueryTypeDefault = `click`
-export const HeatmapsListQueryParams = /* @__PURE__ */ zod.object({
+export const HeatmapsListQueryParams = () => zod.object({
aggregation: zod
.enum(['unique_visitors', 'total_count'])
.default(heatmapsListQueryAggregationDefault)
@@ -122,7 +122,7 @@ export const HeatmapsListQueryParams = /* @__PURE__ */ zod.object({
/**
* Drill into the individual session interactions behind one or more heatmap coordinates. Pass the 'points' you want to inspect (from the heatmaps list response) to get the underlying per-session events, so you can jump to the session recordings that produced a hotspot.
*/
-export const HeatmapsEventsRetrieveParams = /* @__PURE__ */ zod.object({
+export const HeatmapsEventsRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -142,7 +142,7 @@ export const heatmapsEventsRetrieveQueryOffsetMin = 0
export const heatmapsEventsRetrieveQueryTypeDefault = `click`
-export const HeatmapsEventsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const HeatmapsEventsRetrieveQueryParams = () => zod.object({
aggregation: zod
.enum(['unique_visitors', 'total_count'])
.default(heatmapsEventsRetrieveQueryAggregationDefault)
@@ -232,7 +232,7 @@ export const HeatmapsEventsRetrieveQueryParams = /* @__PURE__ */ zod.object({
/**
* List saved heatmaps for the project. A saved heatmap pins a page URL and a set of viewport widths, and (for type 'screenshot') renders the page so heatmap data can be overlaid on it.
*/
-export const SavedListParams = /* @__PURE__ */ zod.object({
+export const SavedListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -243,7 +243,7 @@ export const SavedListParams = /* @__PURE__ */ zod.object({
export const savedListQueryLimitDefault = 100
export const savedListQueryOffsetDefault = 0
-export const SavedListQueryParams = /* @__PURE__ */ zod.object({
+export const SavedListQueryParams = () => zod.object({
created_by: zod.number().optional().describe("Filter by the creating user's ID."),
limit: zod.number().default(savedListQueryLimitDefault).describe('Maximum saved heatmaps to return.'),
offset: zod.number().default(savedListQueryOffsetDefault).describe('Number to skip, for pagination.'),
@@ -260,7 +260,7 @@ export const SavedListQueryParams = /* @__PURE__ */ zod.object({
/**
* Create a saved heatmap for a page URL. For type 'screenshot' (the default) this enqueues a headless render of the page at each target width; poll the saved heatmap or its content endpoint until status is 'completed'. Provide 'widths' to control which viewport widths are rendered.
*/
-export const SavedCreateParams = /* @__PURE__ */ zod.object({
+export const SavedCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -283,7 +283,7 @@ export const savedCreateBodyWidthsMax = 16
export const savedCreateBodyTypeDefault = `screenshot`
-export const SavedCreateBody = /* @__PURE__ */ zod.object({
+export const SavedCreateBody = () => zod.object({
name: zod.string().max(savedCreateBodyNameMax).nullish().describe('Human-readable label for the saved heatmap.'),
url: zod
.url()
@@ -318,7 +318,7 @@ export const SavedCreateBody = /* @__PURE__ */ zod.object({
/**
* Get a single saved heatmap by its short_id, including per-width render status.
*/
-export const SavedRetrieveParams = /* @__PURE__ */ zod.object({
+export const SavedRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -330,7 +330,7 @@ export const SavedRetrieveParams = /* @__PURE__ */ zod.object({
/**
* Update a saved heatmap (e.g. rename, change widths, or soft-delete via 'deleted'). Changing the URL of a 'screenshot' heatmap triggers a re-render.
*/
-export const SavedPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const SavedPartialUpdateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -352,7 +352,7 @@ export const savedPartialUpdateBodyWidthsItemMax = 3000
export const savedPartialUpdateBodyWidthsMax = 16
-export const SavedPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const SavedPartialUpdateBody = () => zod.object({
name: zod
.string()
.max(savedPartialUpdateBodyNameMax)
@@ -396,7 +396,7 @@ export const SavedPartialUpdateBody = /* @__PURE__ */ zod.object({
/**
* Re-run screenshot generation for a saved heatmap of type 'screenshot'. Clears existing renders and re-renders at every target width; status returns to 'processing'.
*/
-export const SavedRegenerateCreateParams = /* @__PURE__ */ zod.object({
+export const SavedRegenerateCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -409,7 +409,7 @@ export const SavedRegenerateCreateParams = /* @__PURE__ */ zod.object({
* Summarizes a project's web analytics over a lookback window (default 7 days): unique visitors, pageviews, sessions, bounce rate, and average session duration with period-over-period comparisons, plus the top 5 pages, top 5 traffic sources, and goal conversions.
* @summary Summarize web analytics
*/
-export const WebAnalyticsWeeklyDigestParams = /* @__PURE__ */ zod.object({
+export const WebAnalyticsWeeklyDigestParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -420,7 +420,7 @@ export const WebAnalyticsWeeklyDigestParams = /* @__PURE__ */ zod.object({
export const webAnalyticsWeeklyDigestQueryCompareDefault = true
export const webAnalyticsWeeklyDigestQueryDaysDefault = 7
-export const WebAnalyticsWeeklyDigestQueryParams = /* @__PURE__ */ zod.object({
+export const WebAnalyticsWeeklyDigestQueryParams = () => zod.object({
compare: zod
.boolean()
.default(webAnalyticsWeeklyDigestQueryCompareDefault)
@@ -437,7 +437,7 @@ export const WebAnalyticsWeeklyDigestQueryParams = /* @__PURE__ */ zod.object({
* Merges the suggestion's rules into the team's path_cleaning_filters (never overwrites existing rules) and resolves the underlying health issue. Requires project admin, matching the team API's gate on path_cleaning_filters.
* @summary Apply a path-cleaning suggestion
*/
-export const WebAnalyticsPathCleaningSuggestionsApplyParams = /* @__PURE__ */ zod.object({
+export const WebAnalyticsPathCleaningSuggestionsApplyParams = () => zod.object({
id: zod.string(),
project_id: zod
.string()
@@ -450,7 +450,7 @@ export const WebAnalyticsPathCleaningSuggestionsApplyParams = /* @__PURE__ */ zo
* Samples the team's recent paths, asks the LLM for cleaning rules, validates them against the real paths, and stores the result as a `path_cleaning_suggestions` health issue (replacing any previous active one). Runs even if the team already has rules. Returns the suggestion (or a skip status when there aren't enough paths to suggest from).
* @summary Generate path-cleaning suggestions on demand
*/
-export const WebAnalyticsPathCleaningSuggestionsGenerateParams = /* @__PURE__ */ zod.object({
+export const WebAnalyticsPathCleaningSuggestionsGenerateParams = () => zod.object({
project_id: zod
.string()
.describe(
diff --git a/services/mcp/src/generated/workflows/api.ts b/services/mcp/src/generated/workflows/api.ts
index 5564bebba47f..f3f118878399 100644
--- a/services/mcp/src/generated/workflows/api.ts
+++ b/services/mcp/src/generated/workflows/api.ts
@@ -8,7 +8,7 @@
*/
import * as zod from 'zod'
-export const HogFlowsListParams = /* @__PURE__ */ zod.object({
+export const HogFlowsListParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -16,7 +16,7 @@ export const HogFlowsListParams = /* @__PURE__ */ zod.object({
),
})
-export const HogFlowsListQueryParams = /* @__PURE__ */ zod.object({
+export const HogFlowsListQueryParams = () => zod.object({
created_at: zod.iso.datetime({ offset: true }).optional(),
created_by: zod.string().optional().describe('Filter to workflows created by the user with this uuid.'),
id: zod.string().optional(),
@@ -46,7 +46,7 @@ export const HogFlowsListQueryParams = /* @__PURE__ */ zod.object({
updated_at: zod.iso.datetime({ offset: true }).optional(),
})
-export const HogFlowsCreateParams = /* @__PURE__ */ zod.object({
+export const HogFlowsCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -72,7 +72,7 @@ export const hogFlowsCreateBodyActionsItemFiltersOneSourceDefault = `events`
export const hogFlowsCreateBodyActionsItemConfigTwoConditionFiltersOneSourceDefault = `events`
export const hogFlowsCreateBodyActionsItemConfigTwoEventsItemFiltersOneSourceDefault = `events`
-export const HogFlowsCreateBody = /* @__PURE__ */ zod
+export const HogFlowsCreateBody = () => zod
.object({
name: zod.string().max(hogFlowsCreateBodyNameMax).nullish().describe('Workflow name.'),
description: zod.string().default(hogFlowsCreateBodyDescriptionDefault).describe('Optional description.'),
@@ -447,7 +447,7 @@ export const HogFlowsCreateBody = /* @__PURE__ */ zod
})
.describe('Mixin for serializers to add user access control fields')
-export const HogFlowsRetrieveParams = /* @__PURE__ */ zod.object({
+export const HogFlowsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog flow.'),
project_id: zod
.string()
@@ -456,7 +456,7 @@ export const HogFlowsRetrieveParams = /* @__PURE__ */ zod.object({
),
})
-export const HogFlowsPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const HogFlowsPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog flow.'),
project_id: zod
.string()
@@ -473,7 +473,7 @@ export const hogFlowsPartialUpdateBodyTriggerMaskingOneTtlMax = 94608000
export const hogFlowsPartialUpdateBodyConversionOneEventsItemFiltersOneSourceDefault = `events`
export const hogFlowsPartialUpdateBodyEmailSendingRateLimitOneCountMax = 1000000
-export const HogFlowsPartialUpdateBody = /* @__PURE__ */ zod
+export const HogFlowsPartialUpdateBody = () => zod
.object({
name: zod.string().max(hogFlowsPartialUpdateBodyNameMax).nullish().describe('Workflow name.'),
description: zod.string().optional().describe('Optional description.'),
@@ -614,7 +614,7 @@ export const HogFlowsPartialUpdateBody = /* @__PURE__ */ zod
})
.describe('Mixin for serializers to add user access control fields')
-export const HogFlowsActionsEmailPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const HogFlowsActionsEmailPartialUpdateParams = () => zod.object({
action_id: zod.string().describe('Id of the function_email step to edit.'),
id: zod.string().describe('A UUID string identifying this hog flow.'),
project_id: zod
@@ -624,7 +624,7 @@ export const HogFlowsActionsEmailPartialUpdateParams = /* @__PURE__ */ zod.objec
),
})
-export const HogFlowsActionsEmailPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const HogFlowsActionsEmailPartialUpdateBody = () => zod.object({
base_updated_at: zod.iso
.datetime({ offset: true })
.optional()
@@ -698,7 +698,7 @@ export const HogFlowsActionsEmailPartialUpdateBody = /* @__PURE__ */ zod.object(
),
})
-export const HogFlowsBatchJobsListParams = /* @__PURE__ */ zod.object({
+export const HogFlowsBatchJobsListParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog flow.'),
project_id: zod
.string()
@@ -707,7 +707,7 @@ export const HogFlowsBatchJobsListParams = /* @__PURE__ */ zod.object({
),
})
-export const HogFlowsDiscardDraftCreateParams = /* @__PURE__ */ zod.object({
+export const HogFlowsDiscardDraftCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog flow.'),
project_id: zod
.string()
@@ -716,7 +716,7 @@ export const HogFlowsDiscardDraftCreateParams = /* @__PURE__ */ zod.object({
),
})
-export const HogFlowsGraphPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const HogFlowsGraphPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog flow.'),
project_id: zod
.string()
@@ -725,7 +725,7 @@ export const HogFlowsGraphPartialUpdateParams = /* @__PURE__ */ zod.object({
),
})
-export const HogFlowsGraphPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const HogFlowsGraphPartialUpdateBody = () => zod.object({
base_updated_at: zod.iso
.datetime({ offset: true })
.optional()
@@ -816,7 +816,7 @@ export const HogFlowsGraphPartialUpdateBody = /* @__PURE__ */ zod.object({
),
})
-export const HogFlowsInvocationResultsRetrieveParams = /* @__PURE__ */ zod.object({
+export const HogFlowsInvocationResultsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog flow.'),
project_id: zod
.string()
@@ -832,7 +832,7 @@ export const hogFlowsInvocationResultsRetrieveQueryErrorMessageContainsMax = 200
export const hogFlowsInvocationResultsRetrieveQueryLimitDefault = 50
export const hogFlowsInvocationResultsRetrieveQueryLimitMax = 500
-export const HogFlowsInvocationResultsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const HogFlowsInvocationResultsRetrieveQueryParams = () => zod.object({
after: zod
.string()
.min(1)
@@ -871,7 +871,7 @@ export const HogFlowsInvocationResultsRetrieveQueryParams = /* @__PURE__ */ zod.
.describe("Comma-separated invocation statuses to include, e.g. 'failed' or 'success,failed'."),
})
-export const HogFlowsInvocationResultRetrieveParams = /* @__PURE__ */ zod.object({
+export const HogFlowsInvocationResultRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog flow.'),
invocation_id: zod.string(),
project_id: zod
@@ -881,7 +881,7 @@ export const HogFlowsInvocationResultRetrieveParams = /* @__PURE__ */ zod.object
),
})
-export const HogFlowsInvocationsCreateParams = /* @__PURE__ */ zod.object({
+export const HogFlowsInvocationsCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog flow.'),
project_id: zod
.string()
@@ -893,7 +893,7 @@ export const HogFlowsInvocationsCreateParams = /* @__PURE__ */ zod.object({
export const hogFlowsInvocationsCreateBodyMockAsyncFunctionsDefault = true
export const hogFlowsInvocationsCreateBodyUseDraftDefault = false
-export const HogFlowsInvocationsCreateBody = /* @__PURE__ */ zod.object({
+export const HogFlowsInvocationsCreateBody = () => zod.object({
globals: zod
.record(zod.string(), zod.unknown())
.optional()
@@ -918,7 +918,7 @@ export const HogFlowsInvocationsCreateBody = /* @__PURE__ */ zod.object({
),
})
-export const HogFlowsLogsRetrieveParams = /* @__PURE__ */ zod.object({
+export const HogFlowsLogsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog flow.'),
project_id: zod
.string()
@@ -930,7 +930,7 @@ export const HogFlowsLogsRetrieveParams = /* @__PURE__ */ zod.object({
export const hogFlowsLogsRetrieveQueryLimitDefault = 50
export const hogFlowsLogsRetrieveQueryLimitMax = 500
-export const HogFlowsLogsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const HogFlowsLogsRetrieveQueryParams = () => zod.object({
after: zod.iso
.datetime({ offset: true })
.optional()
@@ -958,7 +958,7 @@ export const HogFlowsLogsRetrieveQueryParams = /* @__PURE__ */ zod.object({
search: zod.string().min(1).optional().describe('Case-insensitive substring search across log messages.'),
})
-export const HogFlowsMetricsRetrieveParams = /* @__PURE__ */ zod.object({
+export const HogFlowsMetricsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog flow.'),
project_id: zod
.string()
@@ -972,7 +972,7 @@ export const hogFlowsMetricsRetrieveQueryAfterDefault = `-7d`
export const hogFlowsMetricsRetrieveQueryBreakdownByDefault = `kind`
export const hogFlowsMetricsRetrieveQueryIntervalDefault = `day`
-export const HogFlowsMetricsRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const HogFlowsMetricsRetrieveQueryParams = () => zod.object({
after: zod
.string()
.min(1)
@@ -998,7 +998,7 @@ export const HogFlowsMetricsRetrieveQueryParams = /* @__PURE__ */ zod.object({
name: zod.string().min(1).optional().describe('Comma-separated metric names to filter by.'),
})
-export const HogFlowsPublishCreateParams = /* @__PURE__ */ zod.object({
+export const HogFlowsPublishCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog flow.'),
project_id: zod
.string()
@@ -1009,7 +1009,7 @@ export const HogFlowsPublishCreateParams = /* @__PURE__ */ zod.object({
export const hogFlowsPublishCreateBodyConfirmDefault = false
-export const HogFlowsPublishCreateBody = /* @__PURE__ */ zod.object({
+export const HogFlowsPublishCreateBody = () => zod.object({
confirm: zod
.boolean()
.default(hogFlowsPublishCreateBodyConfirmDefault)
@@ -1024,7 +1024,7 @@ export const HogFlowsPublishCreateBody = /* @__PURE__ */ zod.object({
),
})
-export const HogFlowsRevisionsListParams = /* @__PURE__ */ zod.object({
+export const HogFlowsRevisionsListParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog flow.'),
project_id: zod
.string()
@@ -1033,12 +1033,12 @@ export const HogFlowsRevisionsListParams = /* @__PURE__ */ zod.object({
),
})
-export const HogFlowsRevisionsListQueryParams = /* @__PURE__ */ zod.object({
+export const HogFlowsRevisionsListQueryParams = () => zod.object({
limit: zod.number().optional().describe('Number of results to return per page.'),
offset: zod.number().optional().describe('The initial index from which to return the results.'),
})
-export const HogFlowsRevisionsRetrieveParams = /* @__PURE__ */ zod.object({
+export const HogFlowsRevisionsRetrieveParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog flow.'),
project_id: zod
.string()
@@ -1048,7 +1048,7 @@ export const HogFlowsRevisionsRetrieveParams = /* @__PURE__ */ zod.object({
version: zod.number().describe('Workflow version to fetch.'),
})
-export const HogFlowsRevisionsRestoreCreateParams = /* @__PURE__ */ zod.object({
+export const HogFlowsRevisionsRestoreCreateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog flow.'),
project_id: zod
.string()
@@ -1060,7 +1060,7 @@ export const HogFlowsRevisionsRestoreCreateParams = /* @__PURE__ */ zod.object({
export const hogFlowsRevisionsRestoreCreateBodyOverwriteDefault = false
-export const HogFlowsRevisionsRestoreCreateBody = /* @__PURE__ */ zod.object({
+export const HogFlowsRevisionsRestoreCreateBody = () => zod.object({
overwrite: zod
.boolean()
.default(hogFlowsRevisionsRestoreCreateBodyOverwriteDefault)
@@ -1075,7 +1075,7 @@ export const HogFlowsRevisionsRestoreCreateBody = /* @__PURE__ */ zod.object({
),
})
-export const HogFlowsSchedulesPartialUpdateParams = /* @__PURE__ */ zod.object({
+export const HogFlowsSchedulesPartialUpdateParams = () => zod.object({
id: zod.string().describe('A UUID string identifying this hog flow.'),
project_id: zod
.string()
@@ -1087,7 +1087,7 @@ export const HogFlowsSchedulesPartialUpdateParams = /* @__PURE__ */ zod.object({
export const hogFlowsSchedulesPartialUpdateBodyTimezoneMax = 64
-export const HogFlowsSchedulesPartialUpdateBody = /* @__PURE__ */ zod.object({
+export const HogFlowsSchedulesPartialUpdateBody = () => zod.object({
rrule: zod
.string()
.optional()
@@ -1106,7 +1106,7 @@ export const HogFlowsSchedulesPartialUpdateBody = /* @__PURE__ */ zod.object({
.describe('Variable value overrides merged with the workflow defaults on each run.'),
})
-export const HogFlowsMetricsGlobalRetrieveParams = /* @__PURE__ */ zod.object({
+export const HogFlowsMetricsGlobalRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
@@ -1116,7 +1116,7 @@ export const HogFlowsMetricsGlobalRetrieveParams = /* @__PURE__ */ zod.object({
export const hogFlowsMetricsGlobalRetrieveQueryAfterDefault = `-7d`
-export const HogFlowsMetricsGlobalRetrieveQueryParams = /* @__PURE__ */ zod.object({
+export const HogFlowsMetricsGlobalRetrieveQueryParams = () => zod.object({
after: zod
.string()
.min(1)
diff --git a/services/mcp/src/hono/tool-catalog.ts b/services/mcp/src/hono/tool-catalog.ts
index efb8bc7eb6ab..c2a252d5cc5f 100644
--- a/services/mcp/src/hono/tool-catalog.ts
+++ b/services/mcp/src/hono/tool-catalog.ts
@@ -12,7 +12,13 @@ import {
import type { Tool, ToolBase, ZodObjectAny } from '@/tools/types'
interface PreBuiltTool {
- base: ToolBase<ZodObjectAny>
+ /**
+ * Builds a fresh tool object. Generated tools construct their zod schema
+ * inside the factory, so nothing holds a schema between calls.
+ */
+ build: () => ToolBase<ZodObjectAny>
+ meta: ToolBase<ZodObjectAny>['_meta']
+ rawInputSchema: ToolBase<ZodObjectAny>['rawInputSchema']
definition: ToolDefinition | undefined
}
@@ -68,7 +74,10 @@ function flattenTopLevelUnion(variants: JsonSchema[]): JsonSchema | null {
* so what `tools/list` advertises cannot drift from what the executor validates.
*/
export function toMcpInputSchema(schema: ZodObjectAny): McpTool['inputSchema'] {
- let jsonSchema = toJsonSchemaCompat(schema, { strictUnions: true }) as Record<string, unknown>
+ // Spread drops the non-enumerable `~standard` handle zod attaches to its
+ // output. Its `validate` closure points at the zod instance, so keeping it
+ // would pin every built schema for the life of the catalog.
+ let jsonSchema = { ...(toJsonSchemaCompat(schema, { strictUnions: true }) as Record<string, unknown>) }
delete jsonSchema['$schema']
delete jsonSchema['additionalProperties']
// MCP requires inputSchema.type === 'object'. Top-level discriminated unions
@@ -111,7 +120,9 @@ export class ToolCatalog {
for (const [name, factory] of Object.entries(allFactories)) {
const base = factory()
this._preBuilt.set(name, {
- base,
+ build: factory,
+ meta: base._meta,
+ rawInputSchema: base.rawInputSchema,
definition: defs[name],
})
}
@@ -136,12 +147,12 @@ export class ToolCatalog {
let jsonSchema: McpTool['inputSchema']
try {
- jsonSchema = toMcpInputSchema(preBuilt.base.schema)
+ jsonSchema = toMcpInputSchema(preBuilt.build().schema)
} catch {
jsonSchema = EMPTY_OBJECT_JSON_SCHEMA
}
- let meta = preBuilt.base._meta as Record<string, unknown> | undefined
+ let meta = preBuilt.meta as Record<string, unknown> | undefined
if (meta?.ui && typeof meta.ui === 'object' && 'resourceUri' in meta.ui && !meta[RESOURCE_URI_META_KEY]) {
meta = {
...meta,
@@ -189,8 +200,6 @@ export class ToolCatalog {
if (!preBuilt) {
continue
}
- const { base } = preBuilt
-
const definition = preBuilt.definition
if (!definition) {
continue
@@ -201,7 +210,14 @@ export class ToolCatalog {
}
tools.push({
- ...base,
+ name,
+ // Built on access: listing tools must not build a schema per tool.
+ get schema() {
+ return preBuilt.build().schema
+ },
+ handler: (context, params) => preBuilt.build().handler(context, params),
+ ...(preBuilt.rawInputSchema ? { rawInputSchema: preBuilt.rawInputSchema } : {}),
+ ...(preBuilt.meta ? { _meta: preBuilt.meta } : {}),
title: definition.title,
description: definition.description,
scopes: definition.required_scopes ?? [],
diff --git a/services/mcp/src/hono/tool-executor.ts b/services/mcp/src/hono/tool-executor.ts
index 6f6c8254e4af..a42ef0598971 100644
--- a/services/mcp/src/hono/tool-executor.ts
+++ b/services/mcp/src/hono/tool-executor.ts
@@ -178,12 +178,13 @@ export class ToolExecutor {
return { content: [{ type: 'text', text: `Tool ${toolName} not found` }], isError: true }
}
+ const tool = preBuilt.build()
return this.callTool(
{
name: toolName,
- schema: preBuilt.base.schema,
- handler: (ctx, args) => preBuilt.base.handler(ctx, args),
- _meta: preBuilt.base._meta,
+ schema: tool.schema,
+ handler: (ctx, args) => tool.handler(ctx, args),
+ _meta: tool._meta,
},
callParams,
state,
diff --git a/services/mcp/src/tools/exec.ts b/services/mcp/src/tools/exec.ts
index e19566889a31..eb1de004ed4e 100644
--- a/services/mcp/src/tools/exec.ts
+++ b/services/mcp/src/tools/exec.ts
@@ -923,7 +923,8 @@ export function createExecTool(
// one: formatter-toggle tools then skip the server-side formatter (clean raw
// JSON, no `__formatted_results_override` duplication), and tools where the
// field is a real backend param (dashboard-insights-run) keep full function.
- if (useJson && schemaHasOutputFormat(tool.schema)) {
+ const toolSchema = tool.schema
+ if (useJson && schemaHasOutputFormat(toolSchema)) {
input.output_format = 'json'
}
@@ -931,7 +932,7 @@ export function createExecTool(
// otherwise bad input reaches the HTTP layer and builds URLs like
// `.../actions/undefined/`, a misleading 404 that hides the offending
// field. Dispatch the parsed output so coerced values and defaults apply.
- const validation = tool.schema.safeParse(input, { reportInput: true })
+ const validation = toolSchema.safeParse(input, { reportInput: true })
if (!validation.success) {
const message = formatInputValidationError(tool.name, validation.error)
trackInnerCall?.(tool.name, {
@@ -947,7 +948,7 @@ export function createExecTool(
// which field/alias was rejected — without the payload.
throw new ToolInputValidationError(
message,
- describeValidationError(validation.error, input, tool.schema)
+ describeValidationError(validation.error, input, toolSchema)
)
}
input = validation.data as Record<string, unknown>
diff --git a/services/mcp/src/tools/generated/actions.ts b/services/mcp/src/tools/generated/actions.ts
index eb6cca916925..eaefb454b609 100644
--- a/services/mcp/src/tools/generated/actions.ts
+++ b/services/mcp/src/tools/generated/actions.ts
@@ -2,28 +2,24 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- ActionsCreateBody,
- ActionsDestroyParams,
- ActionsListQueryParams,
- ActionsPartialUpdateBody,
- ActionsPartialUpdateParams,
- ActionsRetrieveParams,
-} from '@/generated/actions/api'
+import * as orvalSchemas from '@/generated/actions/api'
import { withUiApp } from '@/resources/ui-apps'
import { castStringToInt } from '@/tools/cast-helpers'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const ActionCreateSchema = ActionsCreateBody.omit({ _create_in_folder: true }).extend({
- name: ActionsCreateBody.shape['name'].describe('Name of the action (must be unique within the project)'),
-})
+const ActionCreateSchema = () => {
+ const ActionsCreateBody = orvalSchemas.ActionsCreateBody()
+ return ActionsCreateBody.omit({ _create_in_folder: true }).extend({
+ name: ActionsCreateBody.shape['name'].describe('Name of the action (must be unique within the project)'),
+ })
+}
-const actionCreate = (): ToolBase<typeof ActionCreateSchema, WithPostHogUrl<Schemas.Action>> =>
+const actionCreate = (): ToolBase<ReturnType<typeof ActionCreateSchema>, WithPostHogUrl<Schemas.Action>> =>
withUiApp('action', {
name: 'action-create',
- schema: ActionCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ActionCreateSchema>) => {
+ schema: ActionCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ActionCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -56,12 +52,15 @@ const actionCreate = (): ToolBase<typeof ActionCreateSchema, WithPostHogUrl<Sche
},
})
-const ActionDeleteSchema = ActionsDestroyParams.omit({ project_id: true })
+const ActionDeleteSchema = () => {
+ const ActionsDestroyParams = orvalSchemas.ActionsDestroyParams()
+ return ActionsDestroyParams.omit({ project_id: true })
+}
-const actionDelete = (): ToolBase<typeof ActionDeleteSchema, Schemas.Action> => ({
+const actionDelete = (): ToolBase<ReturnType<typeof ActionDeleteSchema>, Schemas.Action> => ({
name: 'action-delete',
- schema: ActionDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof ActionDeleteSchema>) => {
+ schema: ActionDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ActionDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Action>({
method: 'PATCH',
@@ -72,15 +71,18 @@ const actionDelete = (): ToolBase<typeof ActionDeleteSchema, Schemas.Action> =>
},
})
-const ActionGetSchema = ActionsRetrieveParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, ActionsRetrieveParams.shape['id']),
-})
+const ActionGetSchema = () => {
+ const ActionsRetrieveParams = orvalSchemas.ActionsRetrieveParams()
+ return ActionsRetrieveParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, ActionsRetrieveParams.shape['id']),
+ })
+}
-const actionGet = (): ToolBase<typeof ActionGetSchema, WithPostHogUrl<Schemas.Action>> =>
+const actionGet = (): ToolBase<ReturnType<typeof ActionGetSchema>, WithPostHogUrl<Schemas.Action>> =>
withUiApp('action', {
name: 'action-get',
- schema: ActionGetSchema,
- handler: async (context: Context, params: z.infer<typeof ActionGetSchema>) => {
+ schema: ActionGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ActionGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Action>({
method: 'GET',
@@ -90,15 +92,19 @@ const actionGet = (): ToolBase<typeof ActionGetSchema, WithPostHogUrl<Schemas.Ac
},
})
-const ActionUpdateSchema = ActionsPartialUpdateParams.omit({ project_id: true }).extend(
- ActionsPartialUpdateBody.omit({ _create_in_folder: true }).shape
-)
+const ActionUpdateSchema = () => {
+ const ActionsPartialUpdateBody = orvalSchemas.ActionsPartialUpdateBody()
+ const ActionsPartialUpdateParams = orvalSchemas.ActionsPartialUpdateParams()
+ return ActionsPartialUpdateParams.omit({ project_id: true }).extend(
+ ActionsPartialUpdateBody.omit({ _create_in_folder: true }).shape
+ )
+}
-const actionUpdate = (): ToolBase<typeof ActionUpdateSchema, WithPostHogUrl<Schemas.Action>> =>
+const actionUpdate = (): ToolBase<ReturnType<typeof ActionUpdateSchema>, WithPostHogUrl<Schemas.Action>> =>
withUiApp('action', {
name: 'action-update',
- schema: ActionUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ActionUpdateSchema>) => {
+ schema: ActionUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ActionUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -131,13 +137,19 @@ const actionUpdate = (): ToolBase<typeof ActionUpdateSchema, WithPostHogUrl<Sche
},
})
-const ActionsGetAllSchema = ActionsListQueryParams.omit({ format: true })
+const ActionsGetAllSchema = () => {
+ const ActionsListQueryParams = orvalSchemas.ActionsListQueryParams()
+ return ActionsListQueryParams.omit({ format: true })
+}
-const actionsGetAll = (): ToolBase<typeof ActionsGetAllSchema, WithPostHogUrl<Schemas.PaginatedActionList>> =>
+const actionsGetAll = (): ToolBase<
+ ReturnType<typeof ActionsGetAllSchema>,
+ WithPostHogUrl<Schemas.PaginatedActionList>
+> =>
withUiApp('action-list', {
name: 'actions-get-all',
- schema: ActionsGetAllSchema,
- handler: async (context: Context, params: z.infer<typeof ActionsGetAllSchema>) => {
+ schema: ActionsGetAllSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ActionsGetAllSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedActionList>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/ai_observability.ts b/services/mcp/src/tools/generated/ai_observability.ts
index 94cfe9141e11..cff7c3e93649 100644
--- a/services/mcp/src/tools/generated/ai_observability.ts
+++ b/services/mcp/src/tools/generated/ai_observability.ts
@@ -2,101 +2,7 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- DatasetItemsArchiveBody,
- DatasetItemsArchiveParams,
- DatasetItemsCreateBody,
- DatasetItemsListQueryParams,
- DatasetItemsPartialUpdateBody,
- DatasetItemsPartialUpdateParams,
- DatasetItemsRestoreBody,
- DatasetItemsRestoreParams,
- DatasetItemsRetrieveParams,
- DatasetItemsRetrieveQueryParams,
- DatasetItemsVersionsListParams,
- DatasetItemsVersionsListQueryParams,
- DatasetsArchiveParams,
- DatasetsCreateBody,
- DatasetsListQueryParams,
- DatasetsPartialUpdateBody,
- DatasetsPartialUpdateParams,
- DatasetsRestoreParams,
- DatasetsRetrieveParams,
- DatasetsRevisionsListParams,
- DatasetsRevisionsListQueryParams,
- EvaluationDirectoriesCreateBody,
- EvaluationDirectoriesDestroyParams,
- EvaluationDirectoriesPartialUpdateBody,
- EvaluationDirectoriesPartialUpdateParams,
- EvaluationDirectoriesRetrieveParams,
- EvaluationRunsCreateBody,
- EvaluationsCreateBody,
- EvaluationsDestroyParams,
- EvaluationsListQueryParams,
- EvaluationsPartialUpdateBody,
- EvaluationsPartialUpdateParams,
- EvaluationsRetrieveParams,
- EvaluationsTestHogCreateBody,
- LlmAnalyticsClusteringConfigSetEventFiltersCreateBody,
- LlmAnalyticsClusteringJobsCreateBody,
- LlmAnalyticsClusteringJobsDestroyParams,
- LlmAnalyticsClusteringJobsListQueryParams,
- LlmAnalyticsClusteringJobsPartialUpdateBody,
- LlmAnalyticsClusteringJobsPartialUpdateParams,
- LlmAnalyticsClusteringJobsRetrieveParams,
- LlmAnalyticsEvaluationConfigSetActiveKeyCreateBody,
- LlmAnalyticsEvaluationReportsCreateBody,
- LlmAnalyticsEvaluationReportsGenerateCreateParams,
- LlmAnalyticsEvaluationReportsListQueryParams,
- LlmAnalyticsEvaluationReportsPartialUpdateBody,
- LlmAnalyticsEvaluationReportsPartialUpdateParams,
- LlmAnalyticsEvaluationReportsRetrieveParams,
- LlmAnalyticsEvaluationReportsRunsListParams,
- LlmAnalyticsEvaluationReportsRunsListQueryParams,
- LlmAnalyticsModelsRetrieveQueryParams,
- LlmAnalyticsPersonalSpendListQueryParams,
- LlmAnalyticsProviderKeysListQueryParams,
- LlmAnalyticsProviderKeysRetrieveParams,
- LlmAnalyticsReviewQueueItemsCreateBody,
- LlmAnalyticsReviewQueueItemsDestroyParams,
- LlmAnalyticsReviewQueueItemsListQueryParams,
- LlmAnalyticsReviewQueueItemsPartialUpdateBody,
- LlmAnalyticsReviewQueueItemsPartialUpdateParams,
- LlmAnalyticsReviewQueueItemsRetrieveParams,
- LlmAnalyticsReviewQueuesCreateBody,
- LlmAnalyticsReviewQueuesDestroyParams,
- LlmAnalyticsReviewQueuesListQueryParams,
- LlmAnalyticsReviewQueuesPartialUpdateBody,
- LlmAnalyticsReviewQueuesPartialUpdateParams,
- LlmAnalyticsReviewQueuesRetrieveParams,
- LlmAnalyticsScoreDefinitionsCreateBody,
- LlmAnalyticsScoreDefinitionsListQueryParams,
- LlmAnalyticsScoreDefinitionsNewVersionCreateBody,
- LlmAnalyticsScoreDefinitionsNewVersionCreateParams,
- LlmAnalyticsScoreDefinitionsPartialUpdateBody,
- LlmAnalyticsScoreDefinitionsPartialUpdateParams,
- LlmAnalyticsScoreDefinitionsRetrieveParams,
- LlmAnalyticsSummarizationCreateBody,
- LlmAnalyticsTraceReviewsCreateBody,
- LlmAnalyticsTraceReviewsDestroyParams,
- LlmAnalyticsTraceReviewsListQueryParams,
- LlmAnalyticsTraceReviewsPartialUpdateBody,
- LlmAnalyticsTraceReviewsPartialUpdateParams,
- LlmAnalyticsTraceReviewsRetrieveParams,
- LlmPromptsCreateBody,
- LlmPromptsNameDuplicateCreateBody,
- LlmPromptsNameDuplicateCreateParams,
- LlmPromptsNameLabelsDestroyParams,
- LlmPromptsNameLabelsUpdateBody,
- LlmPromptsNameLabelsUpdateParams,
- LlmPromptsNamePartialUpdateBody,
- LlmPromptsNamePartialUpdateParams,
- LlmPromptsNameRetrieveParams,
- LlmPromptsNameRetrieveQueryParams,
- TaggersCreateBody,
- TaggersListQueryParams,
- TaggersTestHogCreateBody,
-} from '@/generated/ai_observability/api'
+import * as orvalSchemas from '@/generated/ai_observability/api'
import { PromptListInputSchema, ScoreDefinitionConfigSchema } from '@/schema/tool-inputs'
import { normalizeParamAliases } from '@/tools/cast-helpers'
import { createQueryWrapper } from '@/tools/query-wrapper-factory'
@@ -109,13 +15,15 @@ import {
} from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const LlmaClusteringConfigGetSchema = z.object({})
+const LlmaClusteringConfigGetSchema = () => z.object({})
-const llmaClusteringConfigGet = (): ToolBase<typeof LlmaClusteringConfigGetSchema, Schemas.ClusteringConfig> => ({
+const llmaClusteringConfigGet = (): ToolBase<
+ ReturnType<typeof LlmaClusteringConfigGetSchema>,
+ Schemas.ClusteringConfig
+> => ({
name: 'llma-clustering-config-get',
- schema: LlmaClusteringConfigGetSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof LlmaClusteringConfigGetSchema>) => {
+ schema: LlmaClusteringConfigGetSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof LlmaClusteringConfigGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ClusteringConfig>({
method: 'GET',
@@ -125,15 +33,22 @@ const llmaClusteringConfigGet = (): ToolBase<typeof LlmaClusteringConfigGetSchem
},
})
-const LlmaClusteringConfigSetEventFiltersSchema = LlmAnalyticsClusteringConfigSetEventFiltersCreateBody
+const LlmaClusteringConfigSetEventFiltersSchema = () => {
+ const LlmAnalyticsClusteringConfigSetEventFiltersCreateBody =
+ orvalSchemas.LlmAnalyticsClusteringConfigSetEventFiltersCreateBody()
+ return LlmAnalyticsClusteringConfigSetEventFiltersCreateBody
+}
const llmaClusteringConfigSetEventFilters = (): ToolBase<
- typeof LlmaClusteringConfigSetEventFiltersSchema,
+ ReturnType<typeof LlmaClusteringConfigSetEventFiltersSchema>,
Schemas.ClusteringConfig
> => ({
name: 'llma-clustering-config-set-event-filters',
- schema: LlmaClusteringConfigSetEventFiltersSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaClusteringConfigSetEventFiltersSchema>) => {
+ schema: LlmaClusteringConfigSetEventFiltersSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof LlmaClusteringConfigSetEventFiltersSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.event_filters !== undefined) {
@@ -148,12 +63,18 @@ const llmaClusteringConfigSetEventFilters = (): ToolBase<
},
})
-const LlmaClusteringJobCreateSchema = LlmAnalyticsClusteringJobsCreateBody
+const LlmaClusteringJobCreateSchema = () => {
+ const LlmAnalyticsClusteringJobsCreateBody = orvalSchemas.LlmAnalyticsClusteringJobsCreateBody()
+ return LlmAnalyticsClusteringJobsCreateBody
+}
-const llmaClusteringJobCreate = (): ToolBase<typeof LlmaClusteringJobCreateSchema, Schemas.ClusteringJob> => ({
+const llmaClusteringJobCreate = (): ToolBase<
+ ReturnType<typeof LlmaClusteringJobCreateSchema>,
+ Schemas.ClusteringJob
+> => ({
name: 'llma-clustering-job-create',
- schema: LlmaClusteringJobCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaClusteringJobCreateSchema>) => {
+ schema: LlmaClusteringJobCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaClusteringJobCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -177,12 +98,15 @@ const llmaClusteringJobCreate = (): ToolBase<typeof LlmaClusteringJobCreateSchem
},
})
-const LlmaClusteringJobDeleteSchema = LlmAnalyticsClusteringJobsDestroyParams.omit({ project_id: true })
+const LlmaClusteringJobDeleteSchema = () => {
+ const LlmAnalyticsClusteringJobsDestroyParams = orvalSchemas.LlmAnalyticsClusteringJobsDestroyParams()
+ return LlmAnalyticsClusteringJobsDestroyParams.omit({ project_id: true })
+}
-const llmaClusteringJobDelete = (): ToolBase<typeof LlmaClusteringJobDeleteSchema, unknown> => ({
+const llmaClusteringJobDelete = (): ToolBase<ReturnType<typeof LlmaClusteringJobDeleteSchema>, unknown> => ({
name: 'llma-clustering-job-delete',
- schema: LlmaClusteringJobDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaClusteringJobDeleteSchema>) => {
+ schema: LlmaClusteringJobDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaClusteringJobDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -192,12 +116,15 @@ const llmaClusteringJobDelete = (): ToolBase<typeof LlmaClusteringJobDeleteSchem
},
})
-const LlmaClusteringJobGetSchema = LlmAnalyticsClusteringJobsRetrieveParams.omit({ project_id: true })
+const LlmaClusteringJobGetSchema = () => {
+ const LlmAnalyticsClusteringJobsRetrieveParams = orvalSchemas.LlmAnalyticsClusteringJobsRetrieveParams()
+ return LlmAnalyticsClusteringJobsRetrieveParams.omit({ project_id: true })
+}
-const llmaClusteringJobGet = (): ToolBase<typeof LlmaClusteringJobGetSchema, Schemas.ClusteringJob> => ({
+const llmaClusteringJobGet = (): ToolBase<ReturnType<typeof LlmaClusteringJobGetSchema>, Schemas.ClusteringJob> => ({
name: 'llma-clustering-job-get',
- schema: LlmaClusteringJobGetSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaClusteringJobGetSchema>) => {
+ schema: LlmaClusteringJobGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaClusteringJobGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ClusteringJob>({
method: 'GET',
@@ -207,12 +134,18 @@ const llmaClusteringJobGet = (): ToolBase<typeof LlmaClusteringJobGetSchema, Sch
},
})
-const LlmaClusteringJobListSchema = LlmAnalyticsClusteringJobsListQueryParams
+const LlmaClusteringJobListSchema = () => {
+ const LlmAnalyticsClusteringJobsListQueryParams = orvalSchemas.LlmAnalyticsClusteringJobsListQueryParams()
+ return LlmAnalyticsClusteringJobsListQueryParams
+}
-const llmaClusteringJobList = (): ToolBase<typeof LlmaClusteringJobListSchema, Schemas.PaginatedClusteringJobList> => ({
+const llmaClusteringJobList = (): ToolBase<
+ ReturnType<typeof LlmaClusteringJobListSchema>,
+ Schemas.PaginatedClusteringJobList
+> => ({
name: 'llma-clustering-job-list',
- schema: LlmaClusteringJobListSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaClusteringJobListSchema>) => {
+ schema: LlmaClusteringJobListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaClusteringJobListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedClusteringJobList>({
method: 'GET',
@@ -226,14 +159,21 @@ const llmaClusteringJobList = (): ToolBase<typeof LlmaClusteringJobListSchema, S
},
})
-const LlmaClusteringJobUpdateSchema = LlmAnalyticsClusteringJobsPartialUpdateParams.omit({ project_id: true }).extend(
- LlmAnalyticsClusteringJobsPartialUpdateBody.shape
-)
+const LlmaClusteringJobUpdateSchema = () => {
+ const LlmAnalyticsClusteringJobsPartialUpdateBody = orvalSchemas.LlmAnalyticsClusteringJobsPartialUpdateBody()
+ const LlmAnalyticsClusteringJobsPartialUpdateParams = orvalSchemas.LlmAnalyticsClusteringJobsPartialUpdateParams()
+ return LlmAnalyticsClusteringJobsPartialUpdateParams.omit({ project_id: true }).extend(
+ LlmAnalyticsClusteringJobsPartialUpdateBody.shape
+ )
+}
-const llmaClusteringJobUpdate = (): ToolBase<typeof LlmaClusteringJobUpdateSchema, Schemas.ClusteringJob> => ({
+const llmaClusteringJobUpdate = (): ToolBase<
+ ReturnType<typeof LlmaClusteringJobUpdateSchema>,
+ Schemas.ClusteringJob
+> => ({
name: 'llma-clustering-job-update',
- schema: LlmaClusteringJobUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaClusteringJobUpdateSchema>) => {
+ schema: LlmaClusteringJobUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaClusteringJobUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -257,15 +197,18 @@ const llmaClusteringJobUpdate = (): ToolBase<typeof LlmaClusteringJobUpdateSchem
},
})
-const LlmaDatasetArchiveSchema = DatasetsArchiveParams.omit({ project_id: true })
+const LlmaDatasetArchiveSchema = () => {
+ const DatasetsArchiveParams = orvalSchemas.DatasetsArchiveParams()
+ return DatasetsArchiveParams.omit({ project_id: true })
+}
const llmaDatasetArchive = (): ToolBase<
- typeof LlmaDatasetArchiveSchema,
+ ReturnType<typeof LlmaDatasetArchiveSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.DatasetRead>>
> => ({
name: 'llma-dataset-archive',
- schema: LlmaDatasetArchiveSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaDatasetArchiveSchema>) => {
+ schema: LlmaDatasetArchiveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaDatasetArchiveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.DatasetRead>({
method: 'POST',
@@ -279,15 +222,18 @@ const llmaDatasetArchive = (): ToolBase<
},
})
-const LlmaDatasetCreateSchema = DatasetsCreateBody
+const LlmaDatasetCreateSchema = () => {
+ const DatasetsCreateBody = orvalSchemas.DatasetsCreateBody()
+ return DatasetsCreateBody
+}
const llmaDatasetCreate = (): ToolBase<
- typeof LlmaDatasetCreateSchema,
+ ReturnType<typeof LlmaDatasetCreateSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.DatasetRead>>
> => ({
name: 'llma-dataset-create',
- schema: LlmaDatasetCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaDatasetCreateSchema>) => {
+ schema: LlmaDatasetCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaDatasetCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -312,15 +258,18 @@ const llmaDatasetCreate = (): ToolBase<
},
})
-const LlmaDatasetGetSchema = DatasetsRetrieveParams.omit({ project_id: true })
+const LlmaDatasetGetSchema = () => {
+ const DatasetsRetrieveParams = orvalSchemas.DatasetsRetrieveParams()
+ return DatasetsRetrieveParams.omit({ project_id: true })
+}
const llmaDatasetGet = (): ToolBase<
- typeof LlmaDatasetGetSchema,
+ ReturnType<typeof LlmaDatasetGetSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.DatasetRead>>
> => ({
name: 'llma-dataset-get',
- schema: LlmaDatasetGetSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaDatasetGetSchema>) => {
+ schema: LlmaDatasetGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaDatasetGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.DatasetRead>({
method: 'GET',
@@ -334,17 +283,19 @@ const llmaDatasetGet = (): ToolBase<
},
})
-const LlmaDatasetItemArchiveSchema = DatasetItemsArchiveParams.omit({ project_id: true }).extend(
- DatasetItemsArchiveBody.shape
-)
+const LlmaDatasetItemArchiveSchema = () => {
+ const DatasetItemsArchiveBody = orvalSchemas.DatasetItemsArchiveBody()
+ const DatasetItemsArchiveParams = orvalSchemas.DatasetItemsArchiveParams()
+ return DatasetItemsArchiveParams.omit({ project_id: true }).extend(DatasetItemsArchiveBody.shape)
+}
const llmaDatasetItemArchive = (): ToolBase<
- typeof LlmaDatasetItemArchiveSchema,
+ ReturnType<typeof LlmaDatasetItemArchiveSchema>,
WithInformationalResponse<Schemas.DatasetItemRead>
> => ({
name: 'llma-dataset-item-archive',
- schema: LlmaDatasetItemArchiveSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaDatasetItemArchiveSchema>) => {
+ schema: LlmaDatasetItemArchiveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaDatasetItemArchiveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.base_version !== undefined) {
@@ -363,15 +314,18 @@ const llmaDatasetItemArchive = (): ToolBase<
},
})
-const LlmaDatasetItemCreateSchema = DatasetItemsCreateBody
+const LlmaDatasetItemCreateSchema = () => {
+ const DatasetItemsCreateBody = orvalSchemas.DatasetItemsCreateBody()
+ return DatasetItemsCreateBody
+}
const llmaDatasetItemCreate = (): ToolBase<
- typeof LlmaDatasetItemCreateSchema,
+ ReturnType<typeof LlmaDatasetItemCreateSchema>,
WithInformationalResponse<Schemas.DatasetItemRead>
> => ({
name: 'llma-dataset-item-create',
- schema: LlmaDatasetItemCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaDatasetItemCreateSchema>) => {
+ schema: LlmaDatasetItemCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaDatasetItemCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.dataset !== undefined) {
@@ -414,17 +368,19 @@ const llmaDatasetItemCreate = (): ToolBase<
},
})
-const LlmaDatasetItemGetSchema = DatasetItemsRetrieveParams.omit({ project_id: true }).extend(
- DatasetItemsRetrieveQueryParams.shape
-)
+const LlmaDatasetItemGetSchema = () => {
+ const DatasetItemsRetrieveParams = orvalSchemas.DatasetItemsRetrieveParams()
+ const DatasetItemsRetrieveQueryParams = orvalSchemas.DatasetItemsRetrieveQueryParams()
+ return DatasetItemsRetrieveParams.omit({ project_id: true }).extend(DatasetItemsRetrieveQueryParams.shape)
+}
const llmaDatasetItemGet = (): ToolBase<
- typeof LlmaDatasetItemGetSchema,
+ ReturnType<typeof LlmaDatasetItemGetSchema>,
WithInformationalResponse<Schemas.DatasetItemRead>
> => ({
name: 'llma-dataset-item-get',
- schema: LlmaDatasetItemGetSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaDatasetItemGetSchema>) => {
+ schema: LlmaDatasetItemGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaDatasetItemGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.DatasetItemRead>({
method: 'GET',
@@ -441,15 +397,18 @@ const llmaDatasetItemGet = (): ToolBase<
},
})
-const LlmaDatasetItemListSchema = DatasetItemsListQueryParams
+const LlmaDatasetItemListSchema = () => {
+ const DatasetItemsListQueryParams = orvalSchemas.DatasetItemsListQueryParams()
+ return DatasetItemsListQueryParams
+}
const llmaDatasetItemList = (): ToolBase<
- typeof LlmaDatasetItemListSchema,
+ ReturnType<typeof LlmaDatasetItemListSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.PaginatedDatasetItemReadList>>
> => ({
name: 'llma-dataset-item-list',
- schema: LlmaDatasetItemListSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaDatasetItemListSchema>) => {
+ schema: LlmaDatasetItemListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaDatasetItemListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedDatasetItemReadList>({
method: 'GET',
@@ -486,17 +445,19 @@ const llmaDatasetItemList = (): ToolBase<
},
})
-const LlmaDatasetItemRestoreSchema = DatasetItemsRestoreParams.omit({ project_id: true }).extend(
- DatasetItemsRestoreBody.shape
-)
+const LlmaDatasetItemRestoreSchema = () => {
+ const DatasetItemsRestoreBody = orvalSchemas.DatasetItemsRestoreBody()
+ const DatasetItemsRestoreParams = orvalSchemas.DatasetItemsRestoreParams()
+ return DatasetItemsRestoreParams.omit({ project_id: true }).extend(DatasetItemsRestoreBody.shape)
+}
const llmaDatasetItemRestore = (): ToolBase<
- typeof LlmaDatasetItemRestoreSchema,
+ ReturnType<typeof LlmaDatasetItemRestoreSchema>,
WithInformationalResponse<Schemas.DatasetItemRead>
> => ({
name: 'llma-dataset-item-restore',
- schema: LlmaDatasetItemRestoreSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaDatasetItemRestoreSchema>) => {
+ schema: LlmaDatasetItemRestoreSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaDatasetItemRestoreSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.base_version !== undefined) {
@@ -518,17 +479,19 @@ const llmaDatasetItemRestore = (): ToolBase<
},
})
-const LlmaDatasetItemUpdateSchema = DatasetItemsPartialUpdateParams.omit({ project_id: true }).extend(
- DatasetItemsPartialUpdateBody.shape
-)
+const LlmaDatasetItemUpdateSchema = () => {
+ const DatasetItemsPartialUpdateBody = orvalSchemas.DatasetItemsPartialUpdateBody()
+ const DatasetItemsPartialUpdateParams = orvalSchemas.DatasetItemsPartialUpdateParams()
+ return DatasetItemsPartialUpdateParams.omit({ project_id: true }).extend(DatasetItemsPartialUpdateBody.shape)
+}
const llmaDatasetItemUpdate = (): ToolBase<
- typeof LlmaDatasetItemUpdateSchema,
+ ReturnType<typeof LlmaDatasetItemUpdateSchema>,
WithInformationalResponse<Schemas.DatasetItemRead>
> => ({
name: 'llma-dataset-item-update',
- schema: LlmaDatasetItemUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaDatasetItemUpdateSchema>) => {
+ schema: LlmaDatasetItemUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaDatasetItemUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.base_version !== undefined) {
@@ -556,17 +519,19 @@ const llmaDatasetItemUpdate = (): ToolBase<
},
})
-const LlmaDatasetItemVersionListSchema = DatasetItemsVersionsListParams.omit({ project_id: true }).extend(
- DatasetItemsVersionsListQueryParams.shape
-)
+const LlmaDatasetItemVersionListSchema = () => {
+ const DatasetItemsVersionsListParams = orvalSchemas.DatasetItemsVersionsListParams()
+ const DatasetItemsVersionsListQueryParams = orvalSchemas.DatasetItemsVersionsListQueryParams()
+ return DatasetItemsVersionsListParams.omit({ project_id: true }).extend(DatasetItemsVersionsListQueryParams.shape)
+}
const llmaDatasetItemVersionList = (): ToolBase<
- typeof LlmaDatasetItemVersionListSchema,
+ ReturnType<typeof LlmaDatasetItemVersionListSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.PaginatedDatasetItemReadList>>
> => ({
name: 'llma-dataset-item-version-list',
- schema: LlmaDatasetItemVersionListSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaDatasetItemVersionListSchema>) => {
+ schema: LlmaDatasetItemVersionListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaDatasetItemVersionListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedDatasetItemReadList>({
method: 'GET',
@@ -600,15 +565,18 @@ const llmaDatasetItemVersionList = (): ToolBase<
},
})
-const LlmaDatasetListSchema = DatasetsListQueryParams
+const LlmaDatasetListSchema = () => {
+ const DatasetsListQueryParams = orvalSchemas.DatasetsListQueryParams()
+ return DatasetsListQueryParams
+}
const llmaDatasetList = (): ToolBase<
- typeof LlmaDatasetListSchema,
+ ReturnType<typeof LlmaDatasetListSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.PaginatedDatasetReadList>>
> => ({
name: 'llma-dataset-list',
- schema: LlmaDatasetListSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaDatasetListSchema>) => {
+ schema: LlmaDatasetListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaDatasetListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedDatasetReadList>({
method: 'GET',
@@ -645,15 +613,18 @@ const llmaDatasetList = (): ToolBase<
},
})
-const LlmaDatasetRestoreSchema = DatasetsRestoreParams.omit({ project_id: true })
+const LlmaDatasetRestoreSchema = () => {
+ const DatasetsRestoreParams = orvalSchemas.DatasetsRestoreParams()
+ return DatasetsRestoreParams.omit({ project_id: true })
+}
const llmaDatasetRestore = (): ToolBase<
- typeof LlmaDatasetRestoreSchema,
+ ReturnType<typeof LlmaDatasetRestoreSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.DatasetRead>>
> => ({
name: 'llma-dataset-restore',
- schema: LlmaDatasetRestoreSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaDatasetRestoreSchema>) => {
+ schema: LlmaDatasetRestoreSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaDatasetRestoreSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.DatasetRead>({
method: 'POST',
@@ -667,17 +638,19 @@ const llmaDatasetRestore = (): ToolBase<
},
})
-const LlmaDatasetRevisionListSchema = DatasetsRevisionsListParams.omit({ project_id: true }).extend(
- DatasetsRevisionsListQueryParams.shape
-)
+const LlmaDatasetRevisionListSchema = () => {
+ const DatasetsRevisionsListParams = orvalSchemas.DatasetsRevisionsListParams()
+ const DatasetsRevisionsListQueryParams = orvalSchemas.DatasetsRevisionsListQueryParams()
+ return DatasetsRevisionsListParams.omit({ project_id: true }).extend(DatasetsRevisionsListQueryParams.shape)
+}
const llmaDatasetRevisionList = (): ToolBase<
- typeof LlmaDatasetRevisionListSchema,
+ ReturnType<typeof LlmaDatasetRevisionListSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.PaginatedDatasetRevisionReadList>>
> => ({
name: 'llma-dataset-revision-list',
- schema: LlmaDatasetRevisionListSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaDatasetRevisionListSchema>) => {
+ schema: LlmaDatasetRevisionListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaDatasetRevisionListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedDatasetRevisionReadList>({
method: 'GET',
@@ -701,17 +674,19 @@ const llmaDatasetRevisionList = (): ToolBase<
},
})
-const LlmaDatasetUpdateSchema = DatasetsPartialUpdateParams.omit({ project_id: true }).extend(
- DatasetsPartialUpdateBody.shape
-)
+const LlmaDatasetUpdateSchema = () => {
+ const DatasetsPartialUpdateBody = orvalSchemas.DatasetsPartialUpdateBody()
+ const DatasetsPartialUpdateParams = orvalSchemas.DatasetsPartialUpdateParams()
+ return DatasetsPartialUpdateParams.omit({ project_id: true }).extend(DatasetsPartialUpdateBody.shape)
+}
const llmaDatasetUpdate = (): ToolBase<
- typeof LlmaDatasetUpdateSchema,
+ ReturnType<typeof LlmaDatasetUpdateSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.DatasetRead>>
> => ({
name: 'llma-dataset-update',
- schema: LlmaDatasetUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaDatasetUpdateSchema>) => {
+ schema: LlmaDatasetUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaDatasetUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -736,13 +711,15 @@ const llmaDatasetUpdate = (): ToolBase<
},
})
-const LlmaEvaluationConfigGetSchema = z.object({})
+const LlmaEvaluationConfigGetSchema = () => z.object({})
-const llmaEvaluationConfigGet = (): ToolBase<typeof LlmaEvaluationConfigGetSchema, Schemas.EvaluationConfig> => ({
+const llmaEvaluationConfigGet = (): ToolBase<
+ ReturnType<typeof LlmaEvaluationConfigGetSchema>,
+ Schemas.EvaluationConfig
+> => ({
name: 'llma-evaluation-config-get',
- schema: LlmaEvaluationConfigGetSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationConfigGetSchema>) => {
+ schema: LlmaEvaluationConfigGetSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof LlmaEvaluationConfigGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.EvaluationConfig>({
method: 'GET',
@@ -752,15 +729,19 @@ const llmaEvaluationConfigGet = (): ToolBase<typeof LlmaEvaluationConfigGetSchem
},
})
-const LlmaEvaluationConfigSetActiveKeySchema = LlmAnalyticsEvaluationConfigSetActiveKeyCreateBody
+const LlmaEvaluationConfigSetActiveKeySchema = () => {
+ const LlmAnalyticsEvaluationConfigSetActiveKeyCreateBody =
+ orvalSchemas.LlmAnalyticsEvaluationConfigSetActiveKeyCreateBody()
+ return LlmAnalyticsEvaluationConfigSetActiveKeyCreateBody
+}
const llmaEvaluationConfigSetActiveKey = (): ToolBase<
- typeof LlmaEvaluationConfigSetActiveKeySchema,
+ ReturnType<typeof LlmaEvaluationConfigSetActiveKeySchema>,
Schemas.EvaluationConfig
> => ({
name: 'llma-evaluation-config-set-active-key',
- schema: LlmaEvaluationConfigSetActiveKeySchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationConfigSetActiveKeySchema>) => {
+ schema: LlmaEvaluationConfigSetActiveKeySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationConfigSetActiveKeySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.key_id !== undefined) {
@@ -775,12 +756,15 @@ const llmaEvaluationConfigSetActiveKey = (): ToolBase<
},
})
-const LlmaEvaluationCreateSchema = EvaluationsCreateBody
+const LlmaEvaluationCreateSchema = () => {
+ const EvaluationsCreateBody = orvalSchemas.EvaluationsCreateBody()
+ return EvaluationsCreateBody
+}
-const llmaEvaluationCreate = (): ToolBase<typeof LlmaEvaluationCreateSchema, Schemas.Evaluation> => ({
+const llmaEvaluationCreate = (): ToolBase<ReturnType<typeof LlmaEvaluationCreateSchema>, Schemas.Evaluation> => ({
name: 'llma-evaluation-create',
- schema: LlmaEvaluationCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationCreateSchema>) => {
+ schema: LlmaEvaluationCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -831,15 +815,18 @@ const llmaEvaluationCreate = (): ToolBase<typeof LlmaEvaluationCreateSchema, Sch
},
})
-const LlmaEvaluationDeleteSchema = z.preprocess(
- normalizeParamAliases({ id: ['evaluationId', 'evaluation_id'] }),
- EvaluationsDestroyParams.omit({ project_id: true })
-)
+const LlmaEvaluationDeleteSchema = () => {
+ const EvaluationsDestroyParams = orvalSchemas.EvaluationsDestroyParams()
+ return z.preprocess(
+ normalizeParamAliases({ id: ['evaluationId', 'evaluation_id'] }),
+ EvaluationsDestroyParams.omit({ project_id: true })
+ )
+}
-const llmaEvaluationDelete = (): ToolBase<typeof LlmaEvaluationDeleteSchema, Schemas.Evaluation> => ({
+const llmaEvaluationDelete = (): ToolBase<ReturnType<typeof LlmaEvaluationDeleteSchema>, Schemas.Evaluation> => ({
name: 'llma-evaluation-delete',
- schema: LlmaEvaluationDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationDeleteSchema>) => {
+ schema: LlmaEvaluationDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Evaluation>({
method: 'PATCH',
@@ -850,15 +837,18 @@ const llmaEvaluationDelete = (): ToolBase<typeof LlmaEvaluationDeleteSchema, Sch
},
})
-const LlmaEvaluationDirectoryCreateSchema = EvaluationDirectoriesCreateBody
+const LlmaEvaluationDirectoryCreateSchema = () => {
+ const EvaluationDirectoriesCreateBody = orvalSchemas.EvaluationDirectoriesCreateBody()
+ return EvaluationDirectoriesCreateBody
+}
const llmaEvaluationDirectoryCreate = (): ToolBase<
- typeof LlmaEvaluationDirectoryCreateSchema,
+ ReturnType<typeof LlmaEvaluationDirectoryCreateSchema>,
Schemas.EvaluationDirectory
> => ({
name: 'llma-evaluation-directory-create',
- schema: LlmaEvaluationDirectoryCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationDirectoryCreateSchema>) => {
+ schema: LlmaEvaluationDirectoryCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationDirectoryCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -873,12 +863,18 @@ const llmaEvaluationDirectoryCreate = (): ToolBase<
},
})
-const LlmaEvaluationDirectoryDeleteSchema = EvaluationDirectoriesDestroyParams.omit({ project_id: true })
+const LlmaEvaluationDirectoryDeleteSchema = () => {
+ const EvaluationDirectoriesDestroyParams = orvalSchemas.EvaluationDirectoriesDestroyParams()
+ return EvaluationDirectoriesDestroyParams.omit({ project_id: true })
+}
-const llmaEvaluationDirectoryDelete = (): ToolBase<typeof LlmaEvaluationDirectoryDeleteSchema, unknown> => ({
+const llmaEvaluationDirectoryDelete = (): ToolBase<
+ ReturnType<typeof LlmaEvaluationDirectoryDeleteSchema>,
+ unknown
+> => ({
name: 'llma-evaluation-directory-delete',
- schema: LlmaEvaluationDirectoryDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationDirectoryDeleteSchema>) => {
+ schema: LlmaEvaluationDirectoryDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationDirectoryDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -888,15 +884,18 @@ const llmaEvaluationDirectoryDelete = (): ToolBase<typeof LlmaEvaluationDirector
},
})
-const LlmaEvaluationDirectoryGetSchema = EvaluationDirectoriesRetrieveParams.omit({ project_id: true })
+const LlmaEvaluationDirectoryGetSchema = () => {
+ const EvaluationDirectoriesRetrieveParams = orvalSchemas.EvaluationDirectoriesRetrieveParams()
+ return EvaluationDirectoriesRetrieveParams.omit({ project_id: true })
+}
const llmaEvaluationDirectoryGet = (): ToolBase<
- typeof LlmaEvaluationDirectoryGetSchema,
+ ReturnType<typeof LlmaEvaluationDirectoryGetSchema>,
Schemas.EvaluationDirectory
> => ({
name: 'llma-evaluation-directory-get',
- schema: LlmaEvaluationDirectoryGetSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationDirectoryGetSchema>) => {
+ schema: LlmaEvaluationDirectoryGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationDirectoryGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.EvaluationDirectory>({
method: 'GET',
@@ -906,16 +905,15 @@ const llmaEvaluationDirectoryGet = (): ToolBase<
},
})
-const LlmaEvaluationDirectoryListSchema = z.object({})
+const LlmaEvaluationDirectoryListSchema = () => z.object({})
const llmaEvaluationDirectoryList = (): ToolBase<
- typeof LlmaEvaluationDirectoryListSchema,
+ ReturnType<typeof LlmaEvaluationDirectoryListSchema>,
Schemas.EvaluationDirectory[]
> => ({
name: 'llma-evaluation-directory-list',
- schema: LlmaEvaluationDirectoryListSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationDirectoryListSchema>) => {
+ schema: LlmaEvaluationDirectoryListSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof LlmaEvaluationDirectoryListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.EvaluationDirectory[]>({
method: 'GET',
@@ -925,17 +923,21 @@ const llmaEvaluationDirectoryList = (): ToolBase<
},
})
-const LlmaEvaluationDirectoryUpdateSchema = EvaluationDirectoriesPartialUpdateParams.omit({ project_id: true }).extend(
- EvaluationDirectoriesPartialUpdateBody.shape
-)
+const LlmaEvaluationDirectoryUpdateSchema = () => {
+ const EvaluationDirectoriesPartialUpdateBody = orvalSchemas.EvaluationDirectoriesPartialUpdateBody()
+ const EvaluationDirectoriesPartialUpdateParams = orvalSchemas.EvaluationDirectoriesPartialUpdateParams()
+ return EvaluationDirectoriesPartialUpdateParams.omit({ project_id: true }).extend(
+ EvaluationDirectoriesPartialUpdateBody.shape
+ )
+}
const llmaEvaluationDirectoryUpdate = (): ToolBase<
- typeof LlmaEvaluationDirectoryUpdateSchema,
+ ReturnType<typeof LlmaEvaluationDirectoryUpdateSchema>,
Schemas.EvaluationDirectory
> => ({
name: 'llma-evaluation-directory-update',
- schema: LlmaEvaluationDirectoryUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationDirectoryUpdateSchema>) => {
+ schema: LlmaEvaluationDirectoryUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationDirectoryUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -950,15 +952,18 @@ const llmaEvaluationDirectoryUpdate = (): ToolBase<
},
})
-const LlmaEvaluationGetSchema = z.preprocess(
- normalizeParamAliases({ id: ['evaluationId', 'evaluation_id'] }),
- EvaluationsRetrieveParams.omit({ project_id: true })
-)
+const LlmaEvaluationGetSchema = () => {
+ const EvaluationsRetrieveParams = orvalSchemas.EvaluationsRetrieveParams()
+ return z.preprocess(
+ normalizeParamAliases({ id: ['evaluationId', 'evaluation_id'] }),
+ EvaluationsRetrieveParams.omit({ project_id: true })
+ )
+}
-const llmaEvaluationGet = (): ToolBase<typeof LlmaEvaluationGetSchema, Schemas.Evaluation> => ({
+const llmaEvaluationGet = (): ToolBase<ReturnType<typeof LlmaEvaluationGetSchema>, Schemas.Evaluation> => ({
name: 'llma-evaluation-get',
- schema: LlmaEvaluationGetSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationGetSchema>) => {
+ schema: LlmaEvaluationGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Evaluation>({
method: 'GET',
@@ -968,15 +973,18 @@ const llmaEvaluationGet = (): ToolBase<typeof LlmaEvaluationGetSchema, Schemas.E
},
})
-const LlmaEvaluationJudgeModelsSchema = LlmAnalyticsModelsRetrieveQueryParams
+const LlmaEvaluationJudgeModelsSchema = () => {
+ const LlmAnalyticsModelsRetrieveQueryParams = orvalSchemas.LlmAnalyticsModelsRetrieveQueryParams()
+ return LlmAnalyticsModelsRetrieveQueryParams
+}
const llmaEvaluationJudgeModels = (): ToolBase<
- typeof LlmaEvaluationJudgeModelsSchema,
+ ReturnType<typeof LlmaEvaluationJudgeModelsSchema>,
Schemas.LLMModelsListResponse
> => ({
name: 'llma-evaluation-judge-models',
- schema: LlmaEvaluationJudgeModelsSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationJudgeModelsSchema>) => {
+ schema: LlmaEvaluationJudgeModelsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationJudgeModelsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.LLMModelsListResponse>({
method: 'GET',
@@ -990,12 +998,18 @@ const llmaEvaluationJudgeModels = (): ToolBase<
},
})
-const LlmaEvaluationListSchema = EvaluationsListQueryParams
+const LlmaEvaluationListSchema = () => {
+ const EvaluationsListQueryParams = orvalSchemas.EvaluationsListQueryParams()
+ return EvaluationsListQueryParams
+}
-const llmaEvaluationList = (): ToolBase<typeof LlmaEvaluationListSchema, Schemas.PaginatedEvaluationList> => ({
+const llmaEvaluationList = (): ToolBase<
+ ReturnType<typeof LlmaEvaluationListSchema>,
+ Schemas.PaginatedEvaluationList
+> => ({
name: 'llma-evaluation-list',
- schema: LlmaEvaluationListSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationListSchema>) => {
+ schema: LlmaEvaluationListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedEvaluationList>({
method: 'GET',
@@ -1016,12 +1030,18 @@ const llmaEvaluationList = (): ToolBase<typeof LlmaEvaluationListSchema, Schemas
},
})
-const LlmaEvaluationReportCreateSchema = LlmAnalyticsEvaluationReportsCreateBody
+const LlmaEvaluationReportCreateSchema = () => {
+ const LlmAnalyticsEvaluationReportsCreateBody = orvalSchemas.LlmAnalyticsEvaluationReportsCreateBody()
+ return LlmAnalyticsEvaluationReportsCreateBody
+}
-const llmaEvaluationReportCreate = (): ToolBase<typeof LlmaEvaluationReportCreateSchema, Schemas.EvaluationReport> => ({
+const llmaEvaluationReportCreate = (): ToolBase<
+ ReturnType<typeof LlmaEvaluationReportCreateSchema>,
+ Schemas.EvaluationReport
+> => ({
name: 'llma-evaluation-report-create',
- schema: LlmaEvaluationReportCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationReportCreateSchema>) => {
+ schema: LlmaEvaluationReportCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationReportCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.evaluation !== undefined) {
@@ -1063,12 +1083,16 @@ const llmaEvaluationReportCreate = (): ToolBase<typeof LlmaEvaluationReportCreat
},
})
-const LlmaEvaluationReportGenerateSchema = LlmAnalyticsEvaluationReportsGenerateCreateParams.omit({ project_id: true })
+const LlmaEvaluationReportGenerateSchema = () => {
+ const LlmAnalyticsEvaluationReportsGenerateCreateParams =
+ orvalSchemas.LlmAnalyticsEvaluationReportsGenerateCreateParams()
+ return LlmAnalyticsEvaluationReportsGenerateCreateParams.omit({ project_id: true })
+}
-const llmaEvaluationReportGenerate = (): ToolBase<typeof LlmaEvaluationReportGenerateSchema, unknown> => ({
+const llmaEvaluationReportGenerate = (): ToolBase<ReturnType<typeof LlmaEvaluationReportGenerateSchema>, unknown> => ({
name: 'llma-evaluation-report-generate',
- schema: LlmaEvaluationReportGenerateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationReportGenerateSchema>) => {
+ schema: LlmaEvaluationReportGenerateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationReportGenerateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'POST',
@@ -1078,12 +1102,18 @@ const llmaEvaluationReportGenerate = (): ToolBase<typeof LlmaEvaluationReportGen
},
})
-const LlmaEvaluationReportGetSchema = LlmAnalyticsEvaluationReportsRetrieveParams.omit({ project_id: true })
+const LlmaEvaluationReportGetSchema = () => {
+ const LlmAnalyticsEvaluationReportsRetrieveParams = orvalSchemas.LlmAnalyticsEvaluationReportsRetrieveParams()
+ return LlmAnalyticsEvaluationReportsRetrieveParams.omit({ project_id: true })
+}
-const llmaEvaluationReportGet = (): ToolBase<typeof LlmaEvaluationReportGetSchema, Schemas.EvaluationReport> => ({
+const llmaEvaluationReportGet = (): ToolBase<
+ ReturnType<typeof LlmaEvaluationReportGetSchema>,
+ Schemas.EvaluationReport
+> => ({
name: 'llma-evaluation-report-get',
- schema: LlmaEvaluationReportGetSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationReportGetSchema>) => {
+ schema: LlmaEvaluationReportGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationReportGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.EvaluationReport>({
method: 'GET',
@@ -1093,15 +1123,18 @@ const llmaEvaluationReportGet = (): ToolBase<typeof LlmaEvaluationReportGetSchem
},
})
-const LlmaEvaluationReportListSchema = LlmAnalyticsEvaluationReportsListQueryParams
+const LlmaEvaluationReportListSchema = () => {
+ const LlmAnalyticsEvaluationReportsListQueryParams = orvalSchemas.LlmAnalyticsEvaluationReportsListQueryParams()
+ return LlmAnalyticsEvaluationReportsListQueryParams
+}
const llmaEvaluationReportList = (): ToolBase<
- typeof LlmaEvaluationReportListSchema,
+ ReturnType<typeof LlmaEvaluationReportListSchema>,
Schemas.PaginatedEvaluationReportList
> => ({
name: 'llma-evaluation-report-list',
- schema: LlmaEvaluationReportListSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationReportListSchema>) => {
+ schema: LlmaEvaluationReportListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationReportListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedEvaluationReportList>({
method: 'GET',
@@ -1116,17 +1149,22 @@ const llmaEvaluationReportList = (): ToolBase<
},
})
-const LlmaEvaluationReportRunListSchema = LlmAnalyticsEvaluationReportsRunsListParams.omit({ project_id: true }).extend(
- LlmAnalyticsEvaluationReportsRunsListQueryParams.shape
-)
+const LlmaEvaluationReportRunListSchema = () => {
+ const LlmAnalyticsEvaluationReportsRunsListParams = orvalSchemas.LlmAnalyticsEvaluationReportsRunsListParams()
+ const LlmAnalyticsEvaluationReportsRunsListQueryParams =
+ orvalSchemas.LlmAnalyticsEvaluationReportsRunsListQueryParams()
+ return LlmAnalyticsEvaluationReportsRunsListParams.omit({ project_id: true }).extend(
+ LlmAnalyticsEvaluationReportsRunsListQueryParams.shape
+ )
+}
const llmaEvaluationReportRunList = (): ToolBase<
- typeof LlmaEvaluationReportRunListSchema,
+ ReturnType<typeof LlmaEvaluationReportRunListSchema>,
Schemas.PaginatedEvaluationReportRunList
> => ({
name: 'llma-evaluation-report-run-list',
- schema: LlmaEvaluationReportRunListSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationReportRunListSchema>) => {
+ schema: LlmaEvaluationReportRunListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationReportRunListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedEvaluationReportRunList>({
method: 'GET',
@@ -1140,17 +1178,22 @@ const llmaEvaluationReportRunList = (): ToolBase<
},
})
-const LlmaEvaluationReportUpdateSchema = LlmAnalyticsEvaluationReportsPartialUpdateParams.omit({
- project_id: true,
-}).extend(LlmAnalyticsEvaluationReportsPartialUpdateBody.shape)
+const LlmaEvaluationReportUpdateSchema = () => {
+ const LlmAnalyticsEvaluationReportsPartialUpdateBody = orvalSchemas.LlmAnalyticsEvaluationReportsPartialUpdateBody()
+ const LlmAnalyticsEvaluationReportsPartialUpdateParams =
+ orvalSchemas.LlmAnalyticsEvaluationReportsPartialUpdateParams()
+ return LlmAnalyticsEvaluationReportsPartialUpdateParams.omit({ project_id: true }).extend(
+ LlmAnalyticsEvaluationReportsPartialUpdateBody.shape
+ )
+}
const llmaEvaluationReportUpdate = (): ToolBase<
- typeof LlmaEvaluationReportUpdateSchema,
+ ReturnType<typeof LlmaEvaluationReportUpdateSchema>,
Schemas.EvaluationReportUpdate
> => ({
name: 'llma-evaluation-report-update',
- schema: LlmaEvaluationReportUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationReportUpdateSchema>) => {
+ schema: LlmaEvaluationReportUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationReportUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.frequency !== undefined) {
@@ -1189,15 +1232,15 @@ const llmaEvaluationReportUpdate = (): ToolBase<
},
})
-const LlmaEvaluationRunSchema = z.preprocess(
- normalizeParamAliases({ evaluation_id: ['evaluationId', 'id'] }),
- EvaluationRunsCreateBody
-)
+const LlmaEvaluationRunSchema = () => {
+ const EvaluationRunsCreateBody = orvalSchemas.EvaluationRunsCreateBody()
+ return z.preprocess(normalizeParamAliases({ evaluation_id: ['evaluationId', 'id'] }), EvaluationRunsCreateBody)
+}
-const llmaEvaluationRun = (): ToolBase<typeof LlmaEvaluationRunSchema, unknown> => ({
+const llmaEvaluationRun = (): ToolBase<ReturnType<typeof LlmaEvaluationRunSchema>, unknown> => ({
name: 'llma-evaluation-run',
- schema: LlmaEvaluationRunSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationRunSchema>) => {
+ schema: LlmaEvaluationRunSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationRunSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.evaluation_id !== undefined) {
@@ -1224,12 +1267,18 @@ const llmaEvaluationRun = (): ToolBase<typeof LlmaEvaluationRunSchema, unknown>
},
})
-const LlmaEvaluationTestHogSchema = EvaluationsTestHogCreateBody
+const LlmaEvaluationTestHogSchema = () => {
+ const EvaluationsTestHogCreateBody = orvalSchemas.EvaluationsTestHogCreateBody()
+ return EvaluationsTestHogCreateBody
+}
-const llmaEvaluationTestHog = (): ToolBase<typeof LlmaEvaluationTestHogSchema, Schemas.TestHogResponse> => ({
+const llmaEvaluationTestHog = (): ToolBase<
+ ReturnType<typeof LlmaEvaluationTestHogSchema>,
+ Schemas.TestHogResponse
+> => ({
name: 'llma-evaluation-test-hog',
- schema: LlmaEvaluationTestHogSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationTestHogSchema>) => {
+ schema: LlmaEvaluationTestHogSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationTestHogSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.source !== undefined) {
@@ -1259,15 +1308,19 @@ const llmaEvaluationTestHog = (): ToolBase<typeof LlmaEvaluationTestHogSchema, S
},
})
-const LlmaEvaluationUpdateSchema = z.preprocess(
- normalizeParamAliases({ id: ['evaluationId', 'evaluation_id'] }),
- EvaluationsPartialUpdateParams.omit({ project_id: true }).extend(EvaluationsPartialUpdateBody.shape)
-)
+const LlmaEvaluationUpdateSchema = () => {
+ const EvaluationsPartialUpdateBody = orvalSchemas.EvaluationsPartialUpdateBody()
+ const EvaluationsPartialUpdateParams = orvalSchemas.EvaluationsPartialUpdateParams()
+ return z.preprocess(
+ normalizeParamAliases({ id: ['evaluationId', 'evaluation_id'] }),
+ EvaluationsPartialUpdateParams.omit({ project_id: true }).extend(EvaluationsPartialUpdateBody.shape)
+ )
+}
-const llmaEvaluationUpdate = (): ToolBase<typeof LlmaEvaluationUpdateSchema, Schemas.Evaluation> => ({
+const llmaEvaluationUpdate = (): ToolBase<ReturnType<typeof LlmaEvaluationUpdateSchema>, Schemas.Evaluation> => ({
name: 'llma-evaluation-update',
- schema: LlmaEvaluationUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaEvaluationUpdateSchema>) => {
+ schema: LlmaEvaluationUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaEvaluationUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -1318,12 +1371,18 @@ const llmaEvaluationUpdate = (): ToolBase<typeof LlmaEvaluationUpdateSchema, Sch
},
})
-const LlmaPersonalSpendSchema = LlmAnalyticsPersonalSpendListQueryParams
+const LlmaPersonalSpendSchema = () => {
+ const LlmAnalyticsPersonalSpendListQueryParams = orvalSchemas.LlmAnalyticsPersonalSpendListQueryParams()
+ return LlmAnalyticsPersonalSpendListQueryParams
+}
-const llmaPersonalSpend = (): ToolBase<typeof LlmaPersonalSpendSchema, Schemas.PersonalSpendAnalysisResponse[]> => ({
+const llmaPersonalSpend = (): ToolBase<
+ ReturnType<typeof LlmaPersonalSpendSchema>,
+ Schemas.PersonalSpendAnalysisResponse[]
+> => ({
name: 'llma-personal-spend',
- schema: LlmaPersonalSpendSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaPersonalSpendSchema>) => {
+ schema: LlmaPersonalSpendSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaPersonalSpendSchema>>) => {
const result = await context.api.request<Schemas.PersonalSpendAnalysisResponse[]>({
method: 'GET',
path: `/api/llm_analytics/@me/spend/`,
@@ -1340,12 +1399,15 @@ const llmaPersonalSpend = (): ToolBase<typeof LlmaPersonalSpendSchema, Schemas.P
},
})
-const LlmaPromptCreateSchema = LlmPromptsCreateBody
+const LlmaPromptCreateSchema = () => {
+ const LlmPromptsCreateBody = orvalSchemas.LlmPromptsCreateBody()
+ return LlmPromptsCreateBody
+}
-const llmaPromptCreate = (): ToolBase<typeof LlmaPromptCreateSchema, Schemas.LLMPrompt> => ({
+const llmaPromptCreate = (): ToolBase<ReturnType<typeof LlmaPromptCreateSchema>, Schemas.LLMPrompt> => ({
name: 'llma-prompt-create',
- schema: LlmaPromptCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaPromptCreateSchema>) => {
+ schema: LlmaPromptCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaPromptCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -1369,14 +1431,18 @@ const llmaPromptCreate = (): ToolBase<typeof LlmaPromptCreateSchema, Schemas.LLM
},
})
-const LlmaPromptDuplicateSchema = LlmPromptsNameDuplicateCreateParams.omit({ project_id: true }).extend(
- LlmPromptsNameDuplicateCreateBody.shape
-)
+const LlmaPromptDuplicateSchema = () => {
+ const LlmPromptsNameDuplicateCreateBody = orvalSchemas.LlmPromptsNameDuplicateCreateBody()
+ const LlmPromptsNameDuplicateCreateParams = orvalSchemas.LlmPromptsNameDuplicateCreateParams()
+ return LlmPromptsNameDuplicateCreateParams.omit({ project_id: true }).extend(
+ LlmPromptsNameDuplicateCreateBody.shape
+ )
+}
-const llmaPromptDuplicate = (): ToolBase<typeof LlmaPromptDuplicateSchema, Schemas.LLMPrompt> => ({
+const llmaPromptDuplicate = (): ToolBase<ReturnType<typeof LlmaPromptDuplicateSchema>, Schemas.LLMPrompt> => ({
name: 'llma-prompt-duplicate',
- schema: LlmaPromptDuplicateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaPromptDuplicateSchema>) => {
+ schema: LlmaPromptDuplicateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaPromptDuplicateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.new_name !== undefined) {
@@ -1391,15 +1457,19 @@ const llmaPromptDuplicate = (): ToolBase<typeof LlmaPromptDuplicateSchema, Schem
},
})
-const LlmaPromptGetSchema = z.preprocess(
- normalizeParamAliases({ prompt_name: ['name', 'promptName', 'prompt_id', 'promptId', 'id'] }),
- LlmPromptsNameRetrieveParams.omit({ project_id: true }).extend(LlmPromptsNameRetrieveQueryParams.shape)
-)
+const LlmaPromptGetSchema = () => {
+ const LlmPromptsNameRetrieveParams = orvalSchemas.LlmPromptsNameRetrieveParams()
+ const LlmPromptsNameRetrieveQueryParams = orvalSchemas.LlmPromptsNameRetrieveQueryParams()
+ return z.preprocess(
+ normalizeParamAliases({ prompt_name: ['name', 'promptName', 'prompt_id', 'promptId', 'id'] }),
+ LlmPromptsNameRetrieveParams.omit({ project_id: true }).extend(LlmPromptsNameRetrieveQueryParams.shape)
+ )
+}
-const llmaPromptGet = (): ToolBase<typeof LlmaPromptGetSchema, Schemas.LLMPromptPublic> => ({
+const llmaPromptGet = (): ToolBase<ReturnType<typeof LlmaPromptGetSchema>, Schemas.LLMPromptPublic> => ({
name: 'llma-prompt-get',
- schema: LlmaPromptGetSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaPromptGetSchema>) => {
+ schema: LlmaPromptGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaPromptGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.LLMPromptPublic>({
method: 'GET',
@@ -1414,12 +1484,15 @@ const llmaPromptGet = (): ToolBase<typeof LlmaPromptGetSchema, Schemas.LLMPrompt
},
})
-const LlmaPromptLabelDeleteSchema = LlmPromptsNameLabelsDestroyParams.omit({ project_id: true })
+const LlmaPromptLabelDeleteSchema = () => {
+ const LlmPromptsNameLabelsDestroyParams = orvalSchemas.LlmPromptsNameLabelsDestroyParams()
+ return LlmPromptsNameLabelsDestroyParams.omit({ project_id: true })
+}
-const llmaPromptLabelDelete = (): ToolBase<typeof LlmaPromptLabelDeleteSchema, unknown> => ({
+const llmaPromptLabelDelete = (): ToolBase<ReturnType<typeof LlmaPromptLabelDeleteSchema>, unknown> => ({
name: 'llma-prompt-label-delete',
- schema: LlmaPromptLabelDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaPromptLabelDeleteSchema>) => {
+ schema: LlmaPromptLabelDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaPromptLabelDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -1429,14 +1502,16 @@ const llmaPromptLabelDelete = (): ToolBase<typeof LlmaPromptLabelDeleteSchema, u
},
})
-const LlmaPromptLabelSetSchema = LlmPromptsNameLabelsUpdateParams.omit({ project_id: true }).extend(
- LlmPromptsNameLabelsUpdateBody.shape
-)
+const LlmaPromptLabelSetSchema = () => {
+ const LlmPromptsNameLabelsUpdateBody = orvalSchemas.LlmPromptsNameLabelsUpdateBody()
+ const LlmPromptsNameLabelsUpdateParams = orvalSchemas.LlmPromptsNameLabelsUpdateParams()
+ return LlmPromptsNameLabelsUpdateParams.omit({ project_id: true }).extend(LlmPromptsNameLabelsUpdateBody.shape)
+}
-const llmaPromptLabelSet = (): ToolBase<typeof LlmaPromptLabelSetSchema, Schemas.LLMPromptLabel> => ({
+const llmaPromptLabelSet = (): ToolBase<ReturnType<typeof LlmaPromptLabelSetSchema>, Schemas.LLMPromptLabel> => ({
name: 'llma-prompt-label-set',
- schema: LlmaPromptLabelSetSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaPromptLabelSetSchema>) => {
+ schema: LlmaPromptLabelSetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaPromptLabelSetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.version !== undefined) {
@@ -1451,19 +1526,19 @@ const llmaPromptLabelSet = (): ToolBase<typeof LlmaPromptLabelSetSchema, Schemas
},
})
-const LlmaPromptListSchema = PromptListInputSchema
+const LlmaPromptListSchema = () => PromptListInputSchema
const llmaPromptList = (): ToolBase<
- typeof LlmaPromptListSchema,
+ ReturnType<typeof LlmaPromptListSchema>,
Omit<Schemas.PaginatedLLMPromptListList, 'results'> & {
results: (Omit<Schemas.LLMPromptList, 'prompt'> & { prompt?: unknown })[]
}
> => ({
name: 'llma-prompt-list',
- schema: LlmaPromptListSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaPromptListSchema>) => {
+ schema: LlmaPromptListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaPromptListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
- const parsedParams = LlmaPromptListSchema.parse(params)
+ const parsedParams = LlmaPromptListSchema().parse(params)
const result = await context.api.request<
Omit<Schemas.PaginatedLLMPromptListList, 'results'> & {
results: (Omit<Schemas.LLMPromptList, 'prompt'> & { prompt?: unknown })[]
@@ -1477,14 +1552,18 @@ const llmaPromptList = (): ToolBase<
},
})
-const LlmaPromptUpdateSchema = LlmPromptsNamePartialUpdateParams.omit({ project_id: true })
- .extend(LlmPromptsNamePartialUpdateBody.shape)
- .extend({ base_version: LlmPromptsNamePartialUpdateBody.shape['base_version'].unwrap() })
+const LlmaPromptUpdateSchema = () => {
+ const LlmPromptsNamePartialUpdateBody = orvalSchemas.LlmPromptsNamePartialUpdateBody()
+ const LlmPromptsNamePartialUpdateParams = orvalSchemas.LlmPromptsNamePartialUpdateParams()
+ return LlmPromptsNamePartialUpdateParams.omit({ project_id: true })
+ .extend(LlmPromptsNamePartialUpdateBody.shape)
+ .extend({ base_version: LlmPromptsNamePartialUpdateBody.shape['base_version'].unwrap() })
+}
-const llmaPromptUpdate = (): ToolBase<typeof LlmaPromptUpdateSchema, Schemas.LLMPrompt> => ({
+const llmaPromptUpdate = (): ToolBase<ReturnType<typeof LlmaPromptUpdateSchema>, Schemas.LLMPrompt> => ({
name: 'llma-prompt-update',
- schema: LlmaPromptUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaPromptUpdateSchema>) => {
+ schema: LlmaPromptUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaPromptUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.prompt !== undefined) {
@@ -1511,12 +1590,15 @@ const llmaPromptUpdate = (): ToolBase<typeof LlmaPromptUpdateSchema, Schemas.LLM
},
})
-const LlmaProviderKeyGetSchema = LlmAnalyticsProviderKeysRetrieveParams.omit({ project_id: true })
+const LlmaProviderKeyGetSchema = () => {
+ const LlmAnalyticsProviderKeysRetrieveParams = orvalSchemas.LlmAnalyticsProviderKeysRetrieveParams()
+ return LlmAnalyticsProviderKeysRetrieveParams.omit({ project_id: true })
+}
-const llmaProviderKeyGet = (): ToolBase<typeof LlmaProviderKeyGetSchema, Schemas.LLMProviderKey> => ({
+const llmaProviderKeyGet = (): ToolBase<ReturnType<typeof LlmaProviderKeyGetSchema>, Schemas.LLMProviderKey> => ({
name: 'llma-provider-key-get',
- schema: LlmaProviderKeyGetSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaProviderKeyGetSchema>) => {
+ schema: LlmaProviderKeyGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaProviderKeyGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.LLMProviderKey>({
method: 'GET',
@@ -1526,15 +1608,18 @@ const llmaProviderKeyGet = (): ToolBase<typeof LlmaProviderKeyGetSchema, Schemas
},
})
-const LlmaProviderKeyListSchema = LlmAnalyticsProviderKeysListQueryParams
+const LlmaProviderKeyListSchema = () => {
+ const LlmAnalyticsProviderKeysListQueryParams = orvalSchemas.LlmAnalyticsProviderKeysListQueryParams()
+ return LlmAnalyticsProviderKeysListQueryParams
+}
const llmaProviderKeyList = (): ToolBase<
- typeof LlmaProviderKeyListSchema,
+ ReturnType<typeof LlmaProviderKeyListSchema>,
WithPostHogUrl<Schemas.PaginatedLLMProviderKeyList>
> => ({
name: 'llma-provider-key-list',
- schema: LlmaProviderKeyListSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaProviderKeyListSchema>) => {
+ schema: LlmaProviderKeyListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaProviderKeyListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedLLMProviderKeyList>({
method: 'GET',
@@ -1548,15 +1633,18 @@ const llmaProviderKeyList = (): ToolBase<
},
})
-const LlmaReviewQueueCreateSchema = LlmAnalyticsReviewQueuesCreateBody
+const LlmaReviewQueueCreateSchema = () => {
+ const LlmAnalyticsReviewQueuesCreateBody = orvalSchemas.LlmAnalyticsReviewQueuesCreateBody()
+ return LlmAnalyticsReviewQueuesCreateBody
+}
const llmaReviewQueueCreate = (): ToolBase<
- typeof LlmaReviewQueueCreateSchema,
+ ReturnType<typeof LlmaReviewQueueCreateSchema>,
WithPostHogUrl<Schemas.ReviewQueue>
> => ({
name: 'llma-review-queue-create',
- schema: LlmaReviewQueueCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaReviewQueueCreateSchema>) => {
+ schema: LlmaReviewQueueCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaReviewQueueCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -1571,12 +1659,15 @@ const llmaReviewQueueCreate = (): ToolBase<
},
})
-const LlmaReviewQueueDeleteSchema = LlmAnalyticsReviewQueuesDestroyParams.omit({ project_id: true })
+const LlmaReviewQueueDeleteSchema = () => {
+ const LlmAnalyticsReviewQueuesDestroyParams = orvalSchemas.LlmAnalyticsReviewQueuesDestroyParams()
+ return LlmAnalyticsReviewQueuesDestroyParams.omit({ project_id: true })
+}
-const llmaReviewQueueDelete = (): ToolBase<typeof LlmaReviewQueueDeleteSchema, unknown> => ({
+const llmaReviewQueueDelete = (): ToolBase<ReturnType<typeof LlmaReviewQueueDeleteSchema>, unknown> => ({
name: 'llma-review-queue-delete',
- schema: LlmaReviewQueueDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaReviewQueueDeleteSchema>) => {
+ schema: LlmaReviewQueueDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaReviewQueueDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -1586,12 +1677,18 @@ const llmaReviewQueueDelete = (): ToolBase<typeof LlmaReviewQueueDeleteSchema, u
},
})
-const LlmaReviewQueueGetSchema = LlmAnalyticsReviewQueuesRetrieveParams.omit({ project_id: true })
+const LlmaReviewQueueGetSchema = () => {
+ const LlmAnalyticsReviewQueuesRetrieveParams = orvalSchemas.LlmAnalyticsReviewQueuesRetrieveParams()
+ return LlmAnalyticsReviewQueuesRetrieveParams.omit({ project_id: true })
+}
-const llmaReviewQueueGet = (): ToolBase<typeof LlmaReviewQueueGetSchema, WithPostHogUrl<Schemas.ReviewQueue>> => ({
+const llmaReviewQueueGet = (): ToolBase<
+ ReturnType<typeof LlmaReviewQueueGetSchema>,
+ WithPostHogUrl<Schemas.ReviewQueue>
+> => ({
name: 'llma-review-queue-get',
- schema: LlmaReviewQueueGetSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaReviewQueueGetSchema>) => {
+ schema: LlmaReviewQueueGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaReviewQueueGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ReviewQueue>({
method: 'GET',
@@ -1601,15 +1698,18 @@ const llmaReviewQueueGet = (): ToolBase<typeof LlmaReviewQueueGetSchema, WithPos
},
})
-const LlmaReviewQueueItemCreateSchema = LlmAnalyticsReviewQueueItemsCreateBody
+const LlmaReviewQueueItemCreateSchema = () => {
+ const LlmAnalyticsReviewQueueItemsCreateBody = orvalSchemas.LlmAnalyticsReviewQueueItemsCreateBody()
+ return LlmAnalyticsReviewQueueItemsCreateBody
+}
const llmaReviewQueueItemCreate = (): ToolBase<
- typeof LlmaReviewQueueItemCreateSchema,
+ ReturnType<typeof LlmaReviewQueueItemCreateSchema>,
WithPostHogUrl<Schemas.ReviewQueueItem>
> => ({
name: 'llma-review-queue-item-create',
- schema: LlmaReviewQueueItemCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaReviewQueueItemCreateSchema>) => {
+ schema: LlmaReviewQueueItemCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaReviewQueueItemCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.queue_id !== undefined) {
@@ -1627,12 +1727,15 @@ const llmaReviewQueueItemCreate = (): ToolBase<
},
})
-const LlmaReviewQueueItemDeleteSchema = LlmAnalyticsReviewQueueItemsDestroyParams.omit({ project_id: true })
+const LlmaReviewQueueItemDeleteSchema = () => {
+ const LlmAnalyticsReviewQueueItemsDestroyParams = orvalSchemas.LlmAnalyticsReviewQueueItemsDestroyParams()
+ return LlmAnalyticsReviewQueueItemsDestroyParams.omit({ project_id: true })
+}
-const llmaReviewQueueItemDelete = (): ToolBase<typeof LlmaReviewQueueItemDeleteSchema, unknown> => ({
+const llmaReviewQueueItemDelete = (): ToolBase<ReturnType<typeof LlmaReviewQueueItemDeleteSchema>, unknown> => ({
name: 'llma-review-queue-item-delete',
- schema: LlmaReviewQueueItemDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaReviewQueueItemDeleteSchema>) => {
+ schema: LlmaReviewQueueItemDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaReviewQueueItemDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -1642,15 +1745,18 @@ const llmaReviewQueueItemDelete = (): ToolBase<typeof LlmaReviewQueueItemDeleteS
},
})
-const LlmaReviewQueueItemGetSchema = LlmAnalyticsReviewQueueItemsRetrieveParams.omit({ project_id: true })
+const LlmaReviewQueueItemGetSchema = () => {
+ const LlmAnalyticsReviewQueueItemsRetrieveParams = orvalSchemas.LlmAnalyticsReviewQueueItemsRetrieveParams()
+ return LlmAnalyticsReviewQueueItemsRetrieveParams.omit({ project_id: true })
+}
const llmaReviewQueueItemGet = (): ToolBase<
- typeof LlmaReviewQueueItemGetSchema,
+ ReturnType<typeof LlmaReviewQueueItemGetSchema>,
WithPostHogUrl<Schemas.ReviewQueueItem>
> => ({
name: 'llma-review-queue-item-get',
- schema: LlmaReviewQueueItemGetSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaReviewQueueItemGetSchema>) => {
+ schema: LlmaReviewQueueItemGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaReviewQueueItemGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ReviewQueueItem>({
method: 'GET',
@@ -1660,15 +1766,18 @@ const llmaReviewQueueItemGet = (): ToolBase<
},
})
-const LlmaReviewQueueItemListSchema = LlmAnalyticsReviewQueueItemsListQueryParams
+const LlmaReviewQueueItemListSchema = () => {
+ const LlmAnalyticsReviewQueueItemsListQueryParams = orvalSchemas.LlmAnalyticsReviewQueueItemsListQueryParams()
+ return LlmAnalyticsReviewQueueItemsListQueryParams
+}
const llmaReviewQueueItemList = (): ToolBase<
- typeof LlmaReviewQueueItemListSchema,
+ ReturnType<typeof LlmaReviewQueueItemListSchema>,
WithPostHogUrl<Schemas.PaginatedReviewQueueItemList>
> => ({
name: 'llma-review-queue-item-list',
- schema: LlmaReviewQueueItemListSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaReviewQueueItemListSchema>) => {
+ schema: LlmaReviewQueueItemListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaReviewQueueItemListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedReviewQueueItemList>({
method: 'GET',
@@ -1698,17 +1807,22 @@ const llmaReviewQueueItemList = (): ToolBase<
},
})
-const LlmaReviewQueueItemUpdateSchema = LlmAnalyticsReviewQueueItemsPartialUpdateParams.omit({
- project_id: true,
-}).extend(LlmAnalyticsReviewQueueItemsPartialUpdateBody.shape)
+const LlmaReviewQueueItemUpdateSchema = () => {
+ const LlmAnalyticsReviewQueueItemsPartialUpdateBody = orvalSchemas.LlmAnalyticsReviewQueueItemsPartialUpdateBody()
+ const LlmAnalyticsReviewQueueItemsPartialUpdateParams =
+ orvalSchemas.LlmAnalyticsReviewQueueItemsPartialUpdateParams()
+ return LlmAnalyticsReviewQueueItemsPartialUpdateParams.omit({ project_id: true }).extend(
+ LlmAnalyticsReviewQueueItemsPartialUpdateBody.shape
+ )
+}
const llmaReviewQueueItemUpdate = (): ToolBase<
- typeof LlmaReviewQueueItemUpdateSchema,
+ ReturnType<typeof LlmaReviewQueueItemUpdateSchema>,
WithPostHogUrl<Schemas.ReviewQueueItem>
> => ({
name: 'llma-review-queue-item-update',
- schema: LlmaReviewQueueItemUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaReviewQueueItemUpdateSchema>) => {
+ schema: LlmaReviewQueueItemUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaReviewQueueItemUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.queue_id !== undefined) {
@@ -1723,15 +1837,18 @@ const llmaReviewQueueItemUpdate = (): ToolBase<
},
})
-const LlmaReviewQueueListSchema = LlmAnalyticsReviewQueuesListQueryParams
+const LlmaReviewQueueListSchema = () => {
+ const LlmAnalyticsReviewQueuesListQueryParams = orvalSchemas.LlmAnalyticsReviewQueuesListQueryParams()
+ return LlmAnalyticsReviewQueuesListQueryParams
+}
const llmaReviewQueueList = (): ToolBase<
- typeof LlmaReviewQueueListSchema,
+ ReturnType<typeof LlmaReviewQueueListSchema>,
WithPostHogUrl<Schemas.PaginatedReviewQueueList>
> => ({
name: 'llma-review-queue-list',
- schema: LlmaReviewQueueListSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaReviewQueueListSchema>) => {
+ schema: LlmaReviewQueueListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaReviewQueueListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedReviewQueueList>({
method: 'GET',
@@ -1759,17 +1876,21 @@ const llmaReviewQueueList = (): ToolBase<
},
})
-const LlmaReviewQueueUpdateSchema = LlmAnalyticsReviewQueuesPartialUpdateParams.omit({ project_id: true }).extend(
- LlmAnalyticsReviewQueuesPartialUpdateBody.shape
-)
+const LlmaReviewQueueUpdateSchema = () => {
+ const LlmAnalyticsReviewQueuesPartialUpdateBody = orvalSchemas.LlmAnalyticsReviewQueuesPartialUpdateBody()
+ const LlmAnalyticsReviewQueuesPartialUpdateParams = orvalSchemas.LlmAnalyticsReviewQueuesPartialUpdateParams()
+ return LlmAnalyticsReviewQueuesPartialUpdateParams.omit({ project_id: true }).extend(
+ LlmAnalyticsReviewQueuesPartialUpdateBody.shape
+ )
+}
const llmaReviewQueueUpdate = (): ToolBase<
- typeof LlmaReviewQueueUpdateSchema,
+ ReturnType<typeof LlmaReviewQueueUpdateSchema>,
WithPostHogUrl<Schemas.ReviewQueue>
> => ({
name: 'llma-review-queue-update',
- schema: LlmaReviewQueueUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaReviewQueueUpdateSchema>) => {
+ schema: LlmaReviewQueueUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaReviewQueueUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -1784,14 +1905,18 @@ const llmaReviewQueueUpdate = (): ToolBase<
},
})
-const LlmaScoreDefinitionCreateSchema = LlmAnalyticsScoreDefinitionsCreateBody.extend({
- config: ScoreDefinitionConfigSchema,
-})
+const LlmaScoreDefinitionCreateSchema = () => {
+ const LlmAnalyticsScoreDefinitionsCreateBody = orvalSchemas.LlmAnalyticsScoreDefinitionsCreateBody()
+ return LlmAnalyticsScoreDefinitionsCreateBody.extend({ config: ScoreDefinitionConfigSchema })
+}
-const llmaScoreDefinitionCreate = (): ToolBase<typeof LlmaScoreDefinitionCreateSchema, Schemas.ScoreDefinition> => ({
+const llmaScoreDefinitionCreate = (): ToolBase<
+ ReturnType<typeof LlmaScoreDefinitionCreateSchema>,
+ Schemas.ScoreDefinition
+> => ({
name: 'llma-score-definition-create',
- schema: LlmaScoreDefinitionCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaScoreDefinitionCreateSchema>) => {
+ schema: LlmaScoreDefinitionCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaScoreDefinitionCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -1818,12 +1943,18 @@ const llmaScoreDefinitionCreate = (): ToolBase<typeof LlmaScoreDefinitionCreateS
},
})
-const LlmaScoreDefinitionGetSchema = LlmAnalyticsScoreDefinitionsRetrieveParams.omit({ project_id: true })
+const LlmaScoreDefinitionGetSchema = () => {
+ const LlmAnalyticsScoreDefinitionsRetrieveParams = orvalSchemas.LlmAnalyticsScoreDefinitionsRetrieveParams()
+ return LlmAnalyticsScoreDefinitionsRetrieveParams.omit({ project_id: true })
+}
-const llmaScoreDefinitionGet = (): ToolBase<typeof LlmaScoreDefinitionGetSchema, Schemas.ScoreDefinition> => ({
+const llmaScoreDefinitionGet = (): ToolBase<
+ ReturnType<typeof LlmaScoreDefinitionGetSchema>,
+ Schemas.ScoreDefinition
+> => ({
name: 'llma-score-definition-get',
- schema: LlmaScoreDefinitionGetSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaScoreDefinitionGetSchema>) => {
+ schema: LlmaScoreDefinitionGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaScoreDefinitionGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ScoreDefinition>({
method: 'GET',
@@ -1833,15 +1964,18 @@ const llmaScoreDefinitionGet = (): ToolBase<typeof LlmaScoreDefinitionGetSchema,
},
})
-const LlmaScoreDefinitionListSchema = LlmAnalyticsScoreDefinitionsListQueryParams
+const LlmaScoreDefinitionListSchema = () => {
+ const LlmAnalyticsScoreDefinitionsListQueryParams = orvalSchemas.LlmAnalyticsScoreDefinitionsListQueryParams()
+ return LlmAnalyticsScoreDefinitionsListQueryParams
+}
const llmaScoreDefinitionList = (): ToolBase<
- typeof LlmaScoreDefinitionListSchema,
+ ReturnType<typeof LlmaScoreDefinitionListSchema>,
WithPostHogUrl<Schemas.PaginatedScoreDefinitionList>
> => ({
name: 'llma-score-definition-list',
- schema: LlmaScoreDefinitionListSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaScoreDefinitionListSchema>) => {
+ schema: LlmaScoreDefinitionListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaScoreDefinitionListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedScoreDefinitionList>({
method: 'GET',
@@ -1859,19 +1993,23 @@ const llmaScoreDefinitionList = (): ToolBase<
},
})
-const LlmaScoreDefinitionNewVersionSchema = LlmAnalyticsScoreDefinitionsNewVersionCreateParams.omit({
- project_id: true,
-})
- .extend(LlmAnalyticsScoreDefinitionsNewVersionCreateBody.shape)
- .extend({ config: ScoreDefinitionConfigSchema })
+const LlmaScoreDefinitionNewVersionSchema = () => {
+ const LlmAnalyticsScoreDefinitionsNewVersionCreateBody =
+ orvalSchemas.LlmAnalyticsScoreDefinitionsNewVersionCreateBody()
+ const LlmAnalyticsScoreDefinitionsNewVersionCreateParams =
+ orvalSchemas.LlmAnalyticsScoreDefinitionsNewVersionCreateParams()
+ return LlmAnalyticsScoreDefinitionsNewVersionCreateParams.omit({ project_id: true })
+ .extend(LlmAnalyticsScoreDefinitionsNewVersionCreateBody.shape)
+ .extend({ config: ScoreDefinitionConfigSchema })
+}
const llmaScoreDefinitionNewVersion = (): ToolBase<
- typeof LlmaScoreDefinitionNewVersionSchema,
+ ReturnType<typeof LlmaScoreDefinitionNewVersionSchema>,
Schemas.ScoreDefinition
> => ({
name: 'llma-score-definition-new-version',
- schema: LlmaScoreDefinitionNewVersionSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaScoreDefinitionNewVersionSchema>) => {
+ schema: LlmaScoreDefinitionNewVersionSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaScoreDefinitionNewVersionSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.config !== undefined) {
@@ -1889,14 +2027,22 @@ const llmaScoreDefinitionNewVersion = (): ToolBase<
},
})
-const LlmaScoreDefinitionUpdateSchema = LlmAnalyticsScoreDefinitionsPartialUpdateParams.omit({
- project_id: true,
-}).extend(LlmAnalyticsScoreDefinitionsPartialUpdateBody.shape)
+const LlmaScoreDefinitionUpdateSchema = () => {
+ const LlmAnalyticsScoreDefinitionsPartialUpdateBody = orvalSchemas.LlmAnalyticsScoreDefinitionsPartialUpdateBody()
+ const LlmAnalyticsScoreDefinitionsPartialUpdateParams =
+ orvalSchemas.LlmAnalyticsScoreDefinitionsPartialUpdateParams()
+ return LlmAnalyticsScoreDefinitionsPartialUpdateParams.omit({ project_id: true }).extend(
+ LlmAnalyticsScoreDefinitionsPartialUpdateBody.shape
+ )
+}
-const llmaScoreDefinitionUpdate = (): ToolBase<typeof LlmaScoreDefinitionUpdateSchema, Schemas.ScoreDefinition> => ({
+const llmaScoreDefinitionUpdate = (): ToolBase<
+ ReturnType<typeof LlmaScoreDefinitionUpdateSchema>,
+ Schemas.ScoreDefinition
+> => ({
name: 'llma-score-definition-update',
- schema: LlmaScoreDefinitionUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaScoreDefinitionUpdateSchema>) => {
+ schema: LlmaScoreDefinitionUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaScoreDefinitionUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -1917,12 +2063,18 @@ const llmaScoreDefinitionUpdate = (): ToolBase<typeof LlmaScoreDefinitionUpdateS
},
})
-const LlmaSummarizationCreateSchema = LlmAnalyticsSummarizationCreateBody
+const LlmaSummarizationCreateSchema = () => {
+ const LlmAnalyticsSummarizationCreateBody = orvalSchemas.LlmAnalyticsSummarizationCreateBody()
+ return LlmAnalyticsSummarizationCreateBody
+}
-const llmaSummarizationCreate = (): ToolBase<typeof LlmaSummarizationCreateSchema, Schemas.SummarizeResponse> => ({
+const llmaSummarizationCreate = (): ToolBase<
+ ReturnType<typeof LlmaSummarizationCreateSchema>,
+ Schemas.SummarizeResponse
+> => ({
name: 'llma-summarization-create',
- schema: LlmaSummarizationCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaSummarizationCreateSchema>) => {
+ schema: LlmaSummarizationCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaSummarizationCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.summarize_type !== undefined) {
@@ -1961,12 +2113,15 @@ const llmaSummarizationCreate = (): ToolBase<typeof LlmaSummarizationCreateSchem
},
})
-const LlmaTaggerCreateSchema = TaggersCreateBody
+const LlmaTaggerCreateSchema = () => {
+ const TaggersCreateBody = orvalSchemas.TaggersCreateBody()
+ return TaggersCreateBody
+}
-const llmaTaggerCreate = (): ToolBase<typeof LlmaTaggerCreateSchema, WithPostHogUrl<Schemas.Tagger>> => ({
+const llmaTaggerCreate = (): ToolBase<ReturnType<typeof LlmaTaggerCreateSchema>, WithPostHogUrl<Schemas.Tagger>> => ({
name: 'llma-tagger-create',
- schema: LlmaTaggerCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaTaggerCreateSchema>) => {
+ schema: LlmaTaggerCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaTaggerCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -1999,12 +2154,18 @@ const llmaTaggerCreate = (): ToolBase<typeof LlmaTaggerCreateSchema, WithPostHog
},
})
-const LlmaTaggerListSchema = TaggersListQueryParams
+const LlmaTaggerListSchema = () => {
+ const TaggersListQueryParams = orvalSchemas.TaggersListQueryParams()
+ return TaggersListQueryParams
+}
-const llmaTaggerList = (): ToolBase<typeof LlmaTaggerListSchema, WithPostHogUrl<Schemas.PaginatedTaggerList>> => ({
+const llmaTaggerList = (): ToolBase<
+ ReturnType<typeof LlmaTaggerListSchema>,
+ WithPostHogUrl<Schemas.PaginatedTaggerList>
+> => ({
name: 'llma-tagger-list',
- schema: LlmaTaggerListSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaTaggerListSchema>) => {
+ schema: LlmaTaggerListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaTaggerListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedTaggerList>({
method: 'GET',
@@ -2031,12 +2192,15 @@ const llmaTaggerList = (): ToolBase<typeof LlmaTaggerListSchema, WithPostHogUrl<
},
})
-const LlmaTaggerTestHogSchema = TaggersTestHogCreateBody
+const LlmaTaggerTestHogSchema = () => {
+ const TaggersTestHogCreateBody = orvalSchemas.TaggersTestHogCreateBody()
+ return TaggersTestHogCreateBody
+}
-const llmaTaggerTestHog = (): ToolBase<typeof LlmaTaggerTestHogSchema, Schemas.TestHogTaggerResponse> => ({
+const llmaTaggerTestHog = (): ToolBase<ReturnType<typeof LlmaTaggerTestHogSchema>, Schemas.TestHogTaggerResponse> => ({
name: 'llma-tagger-test-hog',
- schema: LlmaTaggerTestHogSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaTaggerTestHogSchema>) => {
+ schema: LlmaTaggerTestHogSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaTaggerTestHogSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.source !== undefined) {
@@ -2057,15 +2221,18 @@ const llmaTaggerTestHog = (): ToolBase<typeof LlmaTaggerTestHogSchema, Schemas.T
},
})
-const LlmaTraceReviewCreateSchema = LlmAnalyticsTraceReviewsCreateBody
+const LlmaTraceReviewCreateSchema = () => {
+ const LlmAnalyticsTraceReviewsCreateBody = orvalSchemas.LlmAnalyticsTraceReviewsCreateBody()
+ return LlmAnalyticsTraceReviewsCreateBody
+}
const llmaTraceReviewCreate = (): ToolBase<
- typeof LlmaTraceReviewCreateSchema,
+ ReturnType<typeof LlmaTraceReviewCreateSchema>,
WithPostHogUrl<Schemas.TraceReview>
> => ({
name: 'llma-trace-review-create',
- schema: LlmaTraceReviewCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaTraceReviewCreateSchema>) => {
+ schema: LlmaTraceReviewCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaTraceReviewCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.trace_id !== undefined) {
@@ -2089,12 +2256,15 @@ const llmaTraceReviewCreate = (): ToolBase<
},
})
-const LlmaTraceReviewDeleteSchema = LlmAnalyticsTraceReviewsDestroyParams.omit({ project_id: true })
+const LlmaTraceReviewDeleteSchema = () => {
+ const LlmAnalyticsTraceReviewsDestroyParams = orvalSchemas.LlmAnalyticsTraceReviewsDestroyParams()
+ return LlmAnalyticsTraceReviewsDestroyParams.omit({ project_id: true })
+}
-const llmaTraceReviewDelete = (): ToolBase<typeof LlmaTraceReviewDeleteSchema, unknown> => ({
+const llmaTraceReviewDelete = (): ToolBase<ReturnType<typeof LlmaTraceReviewDeleteSchema>, unknown> => ({
name: 'llma-trace-review-delete',
- schema: LlmaTraceReviewDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaTraceReviewDeleteSchema>) => {
+ schema: LlmaTraceReviewDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaTraceReviewDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -2104,12 +2274,18 @@ const llmaTraceReviewDelete = (): ToolBase<typeof LlmaTraceReviewDeleteSchema, u
},
})
-const LlmaTraceReviewGetSchema = LlmAnalyticsTraceReviewsRetrieveParams.omit({ project_id: true })
+const LlmaTraceReviewGetSchema = () => {
+ const LlmAnalyticsTraceReviewsRetrieveParams = orvalSchemas.LlmAnalyticsTraceReviewsRetrieveParams()
+ return LlmAnalyticsTraceReviewsRetrieveParams.omit({ project_id: true })
+}
-const llmaTraceReviewGet = (): ToolBase<typeof LlmaTraceReviewGetSchema, WithPostHogUrl<Schemas.TraceReview>> => ({
+const llmaTraceReviewGet = (): ToolBase<
+ ReturnType<typeof LlmaTraceReviewGetSchema>,
+ WithPostHogUrl<Schemas.TraceReview>
+> => ({
name: 'llma-trace-review-get',
- schema: LlmaTraceReviewGetSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaTraceReviewGetSchema>) => {
+ schema: LlmaTraceReviewGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaTraceReviewGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.TraceReview>({
method: 'GET',
@@ -2119,15 +2295,18 @@ const llmaTraceReviewGet = (): ToolBase<typeof LlmaTraceReviewGetSchema, WithPos
},
})
-const LlmaTraceReviewListSchema = LlmAnalyticsTraceReviewsListQueryParams
+const LlmaTraceReviewListSchema = () => {
+ const LlmAnalyticsTraceReviewsListQueryParams = orvalSchemas.LlmAnalyticsTraceReviewsListQueryParams()
+ return LlmAnalyticsTraceReviewsListQueryParams
+}
const llmaTraceReviewList = (): ToolBase<
- typeof LlmaTraceReviewListSchema,
+ ReturnType<typeof LlmaTraceReviewListSchema>,
WithPostHogUrl<Schemas.PaginatedTraceReviewList>
> => ({
name: 'llma-trace-review-list',
- schema: LlmaTraceReviewListSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaTraceReviewListSchema>) => {
+ schema: LlmaTraceReviewListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaTraceReviewListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedTraceReviewList>({
method: 'GET',
@@ -2158,17 +2337,21 @@ const llmaTraceReviewList = (): ToolBase<
},
})
-const LlmaTraceReviewUpdateSchema = LlmAnalyticsTraceReviewsPartialUpdateParams.omit({ project_id: true }).extend(
- LlmAnalyticsTraceReviewsPartialUpdateBody.shape
-)
+const LlmaTraceReviewUpdateSchema = () => {
+ const LlmAnalyticsTraceReviewsPartialUpdateBody = orvalSchemas.LlmAnalyticsTraceReviewsPartialUpdateBody()
+ const LlmAnalyticsTraceReviewsPartialUpdateParams = orvalSchemas.LlmAnalyticsTraceReviewsPartialUpdateParams()
+ return LlmAnalyticsTraceReviewsPartialUpdateParams.omit({ project_id: true }).extend(
+ LlmAnalyticsTraceReviewsPartialUpdateBody.shape
+ )
+}
const llmaTraceReviewUpdate = (): ToolBase<
- typeof LlmaTraceReviewUpdateSchema,
+ ReturnType<typeof LlmaTraceReviewUpdateSchema>,
WithPostHogUrl<Schemas.TraceReview>
> => ({
name: 'llma-trace-review-update',
- schema: LlmaTraceReviewUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof LlmaTraceReviewUpdateSchema>) => {
+ schema: LlmaTraceReviewUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LlmaTraceReviewUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.trace_id !== undefined) {
diff --git a/services/mcp/src/tools/generated/alerts.ts b/services/mcp/src/tools/generated/alerts.ts
index 52c708f1d23d..bb5b67812288 100644
--- a/services/mcp/src/tools/generated/alerts.ts
+++ b/services/mcp/src/tools/generated/alerts.ts
@@ -2,25 +2,19 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- AlertsCreateBody,
- AlertsDestroyParams,
- AlertsListQueryParams,
- AlertsPartialUpdateBody,
- AlertsPartialUpdateParams,
- AlertsRetrieveParams,
- AlertsRetrieveQueryParams,
- AlertsSimulateCreateBody,
-} from '@/generated/alerts/api'
+import * as orvalSchemas from '@/generated/alerts/api'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const AlertCreateSchema = AlertsCreateBody
+const AlertCreateSchema = () => {
+ const AlertsCreateBody = orvalSchemas.AlertsCreateBody()
+ return AlertsCreateBody
+}
-const alertCreate = (): ToolBase<typeof AlertCreateSchema, WithPostHogUrl<Schemas.Alert>> => ({
+const alertCreate = (): ToolBase<ReturnType<typeof AlertCreateSchema>, WithPostHogUrl<Schemas.Alert>> => ({
name: 'alert-create',
- schema: AlertCreateSchema,
- handler: async (context: Context, params: z.infer<typeof AlertCreateSchema>) => {
+ schema: AlertCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AlertCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.insight !== undefined) {
@@ -77,12 +71,15 @@ const alertCreate = (): ToolBase<typeof AlertCreateSchema, WithPostHogUrl<Schema
},
})
-const AlertDeleteSchema = AlertsDestroyParams.omit({ project_id: true })
+const AlertDeleteSchema = () => {
+ const AlertsDestroyParams = orvalSchemas.AlertsDestroyParams()
+ return AlertsDestroyParams.omit({ project_id: true })
+}
-const alertDelete = (): ToolBase<typeof AlertDeleteSchema, unknown> => ({
+const alertDelete = (): ToolBase<ReturnType<typeof AlertDeleteSchema>, unknown> => ({
name: 'alert-delete',
- schema: AlertDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof AlertDeleteSchema>) => {
+ schema: AlertDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AlertDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -92,12 +89,16 @@ const alertDelete = (): ToolBase<typeof AlertDeleteSchema, unknown> => ({
},
})
-const AlertGetSchema = AlertsRetrieveParams.omit({ project_id: true }).extend(AlertsRetrieveQueryParams.shape)
+const AlertGetSchema = () => {
+ const AlertsRetrieveParams = orvalSchemas.AlertsRetrieveParams()
+ const AlertsRetrieveQueryParams = orvalSchemas.AlertsRetrieveQueryParams()
+ return AlertsRetrieveParams.omit({ project_id: true }).extend(AlertsRetrieveQueryParams.shape)
+}
-const alertGet = (): ToolBase<typeof AlertGetSchema, WithPostHogUrl<Schemas.Alert>> => ({
+const alertGet = (): ToolBase<ReturnType<typeof AlertGetSchema>, WithPostHogUrl<Schemas.Alert>> => ({
name: 'alert-get',
- schema: AlertGetSchema,
- handler: async (context: Context, params: z.infer<typeof AlertGetSchema>) => {
+ schema: AlertGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AlertGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Alert>({
method: 'GET',
@@ -113,12 +114,15 @@ const alertGet = (): ToolBase<typeof AlertGetSchema, WithPostHogUrl<Schemas.Aler
},
})
-const AlertSimulateSchema = AlertsSimulateCreateBody
+const AlertSimulateSchema = () => {
+ const AlertsSimulateCreateBody = orvalSchemas.AlertsSimulateCreateBody()
+ return AlertsSimulateCreateBody
+}
-const alertSimulate = (): ToolBase<typeof AlertSimulateSchema, Schemas.AlertSimulateResponse> => ({
+const alertSimulate = (): ToolBase<ReturnType<typeof AlertSimulateSchema>, Schemas.AlertSimulateResponse> => ({
name: 'alert-simulate',
- schema: AlertSimulateSchema,
- handler: async (context: Context, params: z.infer<typeof AlertSimulateSchema>) => {
+ schema: AlertSimulateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AlertSimulateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.insight !== undefined) {
@@ -145,12 +149,16 @@ const alertSimulate = (): ToolBase<typeof AlertSimulateSchema, Schemas.AlertSimu
},
})
-const AlertUpdateSchema = AlertsPartialUpdateParams.omit({ project_id: true }).extend(AlertsPartialUpdateBody.shape)
+const AlertUpdateSchema = () => {
+ const AlertsPartialUpdateBody = orvalSchemas.AlertsPartialUpdateBody()
+ const AlertsPartialUpdateParams = orvalSchemas.AlertsPartialUpdateParams()
+ return AlertsPartialUpdateParams.omit({ project_id: true }).extend(AlertsPartialUpdateBody.shape)
+}
-const alertUpdate = (): ToolBase<typeof AlertUpdateSchema, WithPostHogUrl<Schemas.Alert>> => ({
+const alertUpdate = (): ToolBase<ReturnType<typeof AlertUpdateSchema>, WithPostHogUrl<Schemas.Alert>> => ({
name: 'alert-update',
- schema: AlertUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof AlertUpdateSchema>) => {
+ schema: AlertUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AlertUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.insight !== undefined) {
@@ -207,12 +215,15 @@ const alertUpdate = (): ToolBase<typeof AlertUpdateSchema, WithPostHogUrl<Schema
},
})
-const AlertsListSchema = AlertsListQueryParams
+const AlertsListSchema = () => {
+ const AlertsListQueryParams = orvalSchemas.AlertsListQueryParams()
+ return AlertsListQueryParams
+}
-const alertsList = (): ToolBase<typeof AlertsListSchema, WithPostHogUrl<Schemas.PaginatedAlertList>> => ({
+const alertsList = (): ToolBase<ReturnType<typeof AlertsListSchema>, WithPostHogUrl<Schemas.PaginatedAlertList>> => ({
name: 'alerts-list',
- schema: AlertsListSchema,
- handler: async (context: Context, params: z.infer<typeof AlertsListSchema>) => {
+ schema: AlertsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AlertsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedAlertList>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/annotations.ts b/services/mcp/src/tools/generated/annotations.ts
index ce51fff73175..e5f769864ce1 100644
--- a/services/mcp/src/tools/generated/annotations.ts
+++ b/services/mcp/src/tools/generated/annotations.ts
@@ -2,29 +2,20 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- AnnotationsCreateBody,
- AnnotationsDestroyParams,
- AnnotationsListQueryParams,
- AnnotationsPartialUpdateBody,
- AnnotationsPartialUpdateParams,
- AnnotationsRetrieveParams,
-} from '@/generated/annotations/api'
+import * as orvalSchemas from '@/generated/annotations/api'
import { castStringToInt } from '@/tools/cast-helpers'
import { withPostHogUrl, omitResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const AnnotationCreateSchema = AnnotationsCreateBody.omit({
- creation_type: true,
- dashboard_item: true,
- dashboard_id: true,
- deleted: true,
-})
+const AnnotationCreateSchema = () => {
+ const AnnotationsCreateBody = orvalSchemas.AnnotationsCreateBody()
+ return AnnotationsCreateBody.omit({ creation_type: true, dashboard_item: true, dashboard_id: true, deleted: true })
+}
-const annotationCreate = (): ToolBase<typeof AnnotationCreateSchema, Schemas.Annotation> => ({
+const annotationCreate = (): ToolBase<ReturnType<typeof AnnotationCreateSchema>, Schemas.Annotation> => ({
name: 'annotation-create',
- schema: AnnotationCreateSchema,
- handler: async (context: Context, params: z.infer<typeof AnnotationCreateSchema>) => {
+ schema: AnnotationCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AnnotationCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.content !== undefined) {
@@ -51,12 +42,15 @@ const annotationCreate = (): ToolBase<typeof AnnotationCreateSchema, Schemas.Ann
},
})
-const AnnotationDeleteSchema = AnnotationsDestroyParams.omit({ project_id: true })
+const AnnotationDeleteSchema = () => {
+ const AnnotationsDestroyParams = orvalSchemas.AnnotationsDestroyParams()
+ return AnnotationsDestroyParams.omit({ project_id: true })
+}
-const annotationDelete = (): ToolBase<typeof AnnotationDeleteSchema, Schemas.Annotation> => ({
+const annotationDelete = (): ToolBase<ReturnType<typeof AnnotationDeleteSchema>, Schemas.Annotation> => ({
name: 'annotation-delete',
- schema: AnnotationDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof AnnotationDeleteSchema>) => {
+ schema: AnnotationDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AnnotationDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Annotation>({
method: 'PATCH',
@@ -67,14 +61,17 @@ const annotationDelete = (): ToolBase<typeof AnnotationDeleteSchema, Schemas.Ann
},
})
-const AnnotationRetrieveSchema = AnnotationsRetrieveParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, AnnotationsRetrieveParams.shape['id']),
-})
+const AnnotationRetrieveSchema = () => {
+ const AnnotationsRetrieveParams = orvalSchemas.AnnotationsRetrieveParams()
+ return AnnotationsRetrieveParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, AnnotationsRetrieveParams.shape['id']),
+ })
+}
-const annotationRetrieve = (): ToolBase<typeof AnnotationRetrieveSchema, Schemas.Annotation> => ({
+const annotationRetrieve = (): ToolBase<ReturnType<typeof AnnotationRetrieveSchema>, Schemas.Annotation> => ({
name: 'annotation-retrieve',
- schema: AnnotationRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof AnnotationRetrieveSchema>) => {
+ schema: AnnotationRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AnnotationRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Annotation>({
method: 'GET',
@@ -84,20 +81,23 @@ const annotationRetrieve = (): ToolBase<typeof AnnotationRetrieveSchema, Schemas
},
})
-const AnnotationsListSchema = AnnotationsListQueryParams.extend({
- limit: AnnotationsListQueryParams.shape['limit']
- .default(100)
- .optional()
- .describe('Number of annotations to return per page (default 100).'),
-})
+const AnnotationsListSchema = () => {
+ const AnnotationsListQueryParams = orvalSchemas.AnnotationsListQueryParams()
+ return AnnotationsListQueryParams.extend({
+ limit: AnnotationsListQueryParams.shape['limit']
+ .default(100)
+ .optional()
+ .describe('Number of annotations to return per page (default 100).'),
+ })
+}
const annotationsList = (): ToolBase<
- typeof AnnotationsListSchema,
+ ReturnType<typeof AnnotationsListSchema>,
WithPostHogUrl<Schemas.PaginatedAnnotationList>
> => ({
name: 'annotations-list',
- schema: AnnotationsListSchema,
- handler: async (context: Context, params: z.infer<typeof AnnotationsListSchema>) => {
+ schema: AnnotationsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AnnotationsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedAnnotationList>({
method: 'GET',
@@ -126,15 +126,26 @@ const annotationsList = (): ToolBase<
},
})
-const AnnotationsPartialUpdateSchema = AnnotationsPartialUpdateParams.omit({ project_id: true }).extend(
- AnnotationsPartialUpdateBody.omit({ creation_type: true, dashboard_item: true, dashboard_id: true, deleted: true })
- .shape
-)
+const AnnotationsPartialUpdateSchema = () => {
+ const AnnotationsPartialUpdateBody = orvalSchemas.AnnotationsPartialUpdateBody()
+ const AnnotationsPartialUpdateParams = orvalSchemas.AnnotationsPartialUpdateParams()
+ return AnnotationsPartialUpdateParams.omit({ project_id: true }).extend(
+ AnnotationsPartialUpdateBody.omit({
+ creation_type: true,
+ dashboard_item: true,
+ dashboard_id: true,
+ deleted: true,
+ }).shape
+ )
+}
-const annotationsPartialUpdate = (): ToolBase<typeof AnnotationsPartialUpdateSchema, Schemas.Annotation> => ({
+const annotationsPartialUpdate = (): ToolBase<
+ ReturnType<typeof AnnotationsPartialUpdateSchema>,
+ Schemas.Annotation
+> => ({
name: 'annotations-partial-update',
- schema: AnnotationsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof AnnotationsPartialUpdateSchema>) => {
+ schema: AnnotationsPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AnnotationsPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.content !== undefined) {
diff --git a/services/mcp/src/tools/generated/batch_exports.ts b/services/mcp/src/tools/generated/batch_exports.ts
index d5d9a787a91e..50f08e2b8659 100644
--- a/services/mcp/src/tools/generated/batch_exports.ts
+++ b/services/mcp/src/tools/generated/batch_exports.ts
@@ -2,28 +2,19 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- BatchExportsCreateBody,
- BatchExportsDestroyParams,
- BatchExportsListQueryParams,
- BatchExportsPartialUpdateBody,
- BatchExportsPartialUpdateParams,
- BatchExportsRetrieveParams,
- FileDownloadBatchExportsCancelCreateBody,
- FileDownloadBatchExportsCancelCreateParams,
- FileDownloadBatchExportsCountRowsCreateBody,
- FileDownloadBatchExportsCreateBody,
- FileDownloadBatchExportsRetrieveParams,
-} from '@/generated/batch_exports/api'
+import * as orvalSchemas from '@/generated/batch_exports/api'
import { withPostHogUrl, pickResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const BatchExportCreateSchema = BatchExportsCreateBody
+const BatchExportCreateSchema = () => {
+ const BatchExportsCreateBody = orvalSchemas.BatchExportsCreateBody()
+ return BatchExportsCreateBody
+}
-const batchExportCreate = (): ToolBase<typeof BatchExportCreateSchema, Schemas.BatchExport> => ({
+const batchExportCreate = (): ToolBase<ReturnType<typeof BatchExportCreateSchema>, Schemas.BatchExport> => ({
name: 'batch-export-create',
- schema: BatchExportCreateSchema,
- handler: async (context: Context, params: z.infer<typeof BatchExportCreateSchema>) => {
+ schema: BatchExportCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof BatchExportCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -59,12 +50,15 @@ const batchExportCreate = (): ToolBase<typeof BatchExportCreateSchema, Schemas.B
},
})
-const BatchExportDeleteSchema = BatchExportsDestroyParams.omit({ project_id: true })
+const BatchExportDeleteSchema = () => {
+ const BatchExportsDestroyParams = orvalSchemas.BatchExportsDestroyParams()
+ return BatchExportsDestroyParams.omit({ project_id: true })
+}
-const batchExportDelete = (): ToolBase<typeof BatchExportDeleteSchema, unknown> => ({
+const batchExportDelete = (): ToolBase<ReturnType<typeof BatchExportDeleteSchema>, unknown> => ({
name: 'batch-export-delete',
- schema: BatchExportDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof BatchExportDeleteSchema>) => {
+ schema: BatchExportDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof BatchExportDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -74,12 +68,15 @@ const batchExportDelete = (): ToolBase<typeof BatchExportDeleteSchema, unknown>
},
})
-const BatchExportGetSchema = BatchExportsRetrieveParams.omit({ project_id: true })
+const BatchExportGetSchema = () => {
+ const BatchExportsRetrieveParams = orvalSchemas.BatchExportsRetrieveParams()
+ return BatchExportsRetrieveParams.omit({ project_id: true })
+}
-const batchExportGet = (): ToolBase<typeof BatchExportGetSchema, Schemas.BatchExport> => ({
+const batchExportGet = (): ToolBase<ReturnType<typeof BatchExportGetSchema>, Schemas.BatchExport> => ({
name: 'batch-export-get',
- schema: BatchExportGetSchema,
- handler: async (context: Context, params: z.infer<typeof BatchExportGetSchema>) => {
+ schema: BatchExportGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof BatchExportGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.BatchExport>({
method: 'GET',
@@ -89,14 +86,16 @@ const batchExportGet = (): ToolBase<typeof BatchExportGetSchema, Schemas.BatchEx
},
})
-const BatchExportUpdateSchema = BatchExportsPartialUpdateParams.omit({ project_id: true }).extend(
- BatchExportsPartialUpdateBody.shape
-)
+const BatchExportUpdateSchema = () => {
+ const BatchExportsPartialUpdateBody = orvalSchemas.BatchExportsPartialUpdateBody()
+ const BatchExportsPartialUpdateParams = orvalSchemas.BatchExportsPartialUpdateParams()
+ return BatchExportsPartialUpdateParams.omit({ project_id: true }).extend(BatchExportsPartialUpdateBody.shape)
+}
-const batchExportUpdate = (): ToolBase<typeof BatchExportUpdateSchema, Schemas.BatchExport> => ({
+const batchExportUpdate = (): ToolBase<ReturnType<typeof BatchExportUpdateSchema>, Schemas.BatchExport> => ({
name: 'batch-export-update',
- schema: BatchExportUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof BatchExportUpdateSchema>) => {
+ schema: BatchExportUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof BatchExportUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -132,15 +131,18 @@ const batchExportUpdate = (): ToolBase<typeof BatchExportUpdateSchema, Schemas.B
},
})
-const BatchExportsListSchema = BatchExportsListQueryParams
+const BatchExportsListSchema = () => {
+ const BatchExportsListQueryParams = orvalSchemas.BatchExportsListQueryParams()
+ return BatchExportsListQueryParams
+}
const batchExportsList = (): ToolBase<
- typeof BatchExportsListSchema,
+ ReturnType<typeof BatchExportsListSchema>,
WithPostHogUrl<Schemas.PaginatedBatchExportList>
> => ({
name: 'batch-exports-list',
- schema: BatchExportsListSchema,
- handler: async (context: Context, params: z.infer<typeof BatchExportsListSchema>) => {
+ schema: BatchExportsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof BatchExportsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedBatchExportList>({
method: 'GET',
@@ -171,17 +173,24 @@ const batchExportsList = (): ToolBase<
},
})
-const FileDownloadBatchExportsCancelCreateSchema = FileDownloadBatchExportsCancelCreateParams.omit({
- project_id: true,
-}).extend(FileDownloadBatchExportsCancelCreateBody.shape)
+const FileDownloadBatchExportsCancelCreateSchema = () => {
+ const FileDownloadBatchExportsCancelCreateBody = orvalSchemas.FileDownloadBatchExportsCancelCreateBody()
+ const FileDownloadBatchExportsCancelCreateParams = orvalSchemas.FileDownloadBatchExportsCancelCreateParams()
+ return FileDownloadBatchExportsCancelCreateParams.omit({ project_id: true }).extend(
+ FileDownloadBatchExportsCancelCreateBody.shape
+ )
+}
const fileDownloadBatchExportsCancelCreate = (): ToolBase<
- typeof FileDownloadBatchExportsCancelCreateSchema,
+ ReturnType<typeof FileDownloadBatchExportsCancelCreateSchema>,
unknown
> => ({
name: 'file-download-batch-exports-cancel-create',
- schema: FileDownloadBatchExportsCancelCreateSchema,
- handler: async (context: Context, params: z.infer<typeof FileDownloadBatchExportsCancelCreateSchema>) => {
+ schema: FileDownloadBatchExportsCancelCreateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof FileDownloadBatchExportsCancelCreateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.file !== undefined) {
@@ -214,15 +223,21 @@ const fileDownloadBatchExportsCancelCreate = (): ToolBase<
},
})
-const FileDownloadBatchExportsCountRowsCreateSchema = FileDownloadBatchExportsCountRowsCreateBody
+const FileDownloadBatchExportsCountRowsCreateSchema = () => {
+ const FileDownloadBatchExportsCountRowsCreateBody = orvalSchemas.FileDownloadBatchExportsCountRowsCreateBody()
+ return FileDownloadBatchExportsCountRowsCreateBody
+}
const fileDownloadBatchExportsCountRowsCreate = (): ToolBase<
- typeof FileDownloadBatchExportsCountRowsCreateSchema,
+ ReturnType<typeof FileDownloadBatchExportsCountRowsCreateSchema>,
Schemas.FileDownloadCountRowsResponse
> => ({
name: 'file-download-batch-exports-count-rows-create',
- schema: FileDownloadBatchExportsCountRowsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof FileDownloadBatchExportsCountRowsCreateSchema>) => {
+ schema: FileDownloadBatchExportsCountRowsCreateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof FileDownloadBatchExportsCountRowsCreateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.model !== undefined) {
@@ -240,12 +255,18 @@ const fileDownloadBatchExportsCountRowsCreate = (): ToolBase<
},
})
-const FileDownloadBatchExportsCreateSchema = FileDownloadBatchExportsCreateBody
+const FileDownloadBatchExportsCreateSchema = () => {
+ const FileDownloadBatchExportsCreateBody = orvalSchemas.FileDownloadBatchExportsCreateBody()
+ return FileDownloadBatchExportsCreateBody
+}
-const fileDownloadBatchExportsCreate = (): ToolBase<typeof FileDownloadBatchExportsCreateSchema, unknown> => ({
+const fileDownloadBatchExportsCreate = (): ToolBase<
+ ReturnType<typeof FileDownloadBatchExportsCreateSchema>,
+ unknown
+> => ({
name: 'file-download-batch-exports-create',
- schema: FileDownloadBatchExportsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof FileDownloadBatchExportsCreateSchema>) => {
+ schema: FileDownloadBatchExportsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FileDownloadBatchExportsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.file !== undefined) {
@@ -278,15 +299,18 @@ const fileDownloadBatchExportsCreate = (): ToolBase<typeof FileDownloadBatchExpo
},
})
-const FileDownloadBatchExportsRetrieveSchema = FileDownloadBatchExportsRetrieveParams.omit({ project_id: true })
+const FileDownloadBatchExportsRetrieveSchema = () => {
+ const FileDownloadBatchExportsRetrieveParams = orvalSchemas.FileDownloadBatchExportsRetrieveParams()
+ return FileDownloadBatchExportsRetrieveParams.omit({ project_id: true })
+}
const fileDownloadBatchExportsRetrieve = (): ToolBase<
- typeof FileDownloadBatchExportsRetrieveSchema,
+ ReturnType<typeof FileDownloadBatchExportsRetrieveSchema>,
Schemas.RetrieveFileDownloadResponse
> => ({
name: 'file-download-batch-exports-retrieve',
- schema: FileDownloadBatchExportsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof FileDownloadBatchExportsRetrieveSchema>) => {
+ schema: FileDownloadBatchExportsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FileDownloadBatchExportsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.RetrieveFileDownloadResponse>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/billing.ts b/services/mcp/src/tools/generated/billing.ts
index 5beb58680347..dc901a0ed6ca 100644
--- a/services/mcp/src/tools/generated/billing.ts
+++ b/services/mcp/src/tools/generated/billing.ts
@@ -2,17 +2,19 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import { BillingSpendRetrieveQueryParams, BillingUsageRetrieveQueryParams } from '@/generated/billing/api'
+import * as orvalSchemas from '@/generated/billing/api'
import { omitResponseFields, withInformationalResponse, type WithInformationalResponse } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const BillingOverviewGetSchema = z.object({})
+const BillingOverviewGetSchema = () => z.object({})
-const billingOverviewGet = (): ToolBase<typeof BillingOverviewGetSchema, Schemas.BillingOverviewResponse> => ({
+const billingOverviewGet = (): ToolBase<
+ ReturnType<typeof BillingOverviewGetSchema>,
+ Schemas.BillingOverviewResponse
+> => ({
name: 'billing-overview-get',
- schema: BillingOverviewGetSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof BillingOverviewGetSchema>) => {
+ schema: BillingOverviewGetSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof BillingOverviewGetSchema>>) => {
const result = await context.api.request<Schemas.BillingOverviewResponse>({
method: 'GET',
path: `/api/billing/`,
@@ -50,34 +52,37 @@ const billingOverviewGet = (): ToolBase<typeof BillingOverviewGetSchema, Schemas
},
})
-const BillingSpendGetSchema = BillingSpendRetrieveQueryParams.extend({
- start_date: BillingSpendRetrieveQueryParams.shape['start_date'].describe(
- 'Start date (YYYY-MM-DD). For open-ended investigations, choose an explicit recent window such as the last 30 days. If you use "all", also pass end_date.'
- ),
- end_date: BillingSpendRetrieveQueryParams.shape['end_date'].describe(
- "End date (YYYY-MM-DD), inclusive. Pass this whenever start_date is set; use today's date if the user did not name one."
- ),
- team_ids: BillingSpendRetrieveQueryParams.shape['team_ids'].describe(
- "JSON-encoded array of numeric team (project) IDs to filter by, NOT a comma-separated string. Pass as e.g. `[1,2]`. Omit for every project this request can see: all org teams for full billing-access callers, or the member's visible/project-scoped teams for member read-only callers."
- ),
- usage_types: BillingSpendRetrieveQueryParams.shape['usage_types'].describe(
- 'JSON-encoded array of usage type identifiers to filter on, NOT a comma-separated string. Pass as e.g. `["event_count_in_period"]` or `["event_count_in_period","recording_count_in_period"]`. Omit for all usage types.'
- ),
- breakdowns: BillingSpendRetrieveQueryParams.shape['breakdowns'].describe(
- 'JSON-encoded array of dimensions to break down by, NOT a comma-separated string. Valid dimensions are "type" (by usage type) and "team" (by project). Pass `["type"]` for per-usage-type series, or `["type","team"]` for per-project series within each usage type. Team breakdowns require "type"; do not pass `["team"]` by itself. Omit for a single aggregate series. Sending a bare string like "type,team" will fail with a 400 error.'
- ),
- interval: BillingSpendRetrieveQueryParams.shape['interval'].describe(
- 'Time bucket size, one of "day" or "week". Default "day".'
- ),
-})
+const BillingSpendGetSchema = () => {
+ const BillingSpendRetrieveQueryParams = orvalSchemas.BillingSpendRetrieveQueryParams()
+ return BillingSpendRetrieveQueryParams.extend({
+ start_date: BillingSpendRetrieveQueryParams.shape['start_date'].describe(
+ 'Start date (YYYY-MM-DD). For open-ended investigations, choose an explicit recent window such as the last 30 days. If you use "all", also pass end_date.'
+ ),
+ end_date: BillingSpendRetrieveQueryParams.shape['end_date'].describe(
+ "End date (YYYY-MM-DD), inclusive. Pass this whenever start_date is set; use today's date if the user did not name one."
+ ),
+ team_ids: BillingSpendRetrieveQueryParams.shape['team_ids'].describe(
+ "JSON-encoded array of numeric team (project) IDs to filter by, NOT a comma-separated string. Pass as e.g. `[1,2]`. Omit for every project this request can see: all org teams for full billing-access callers, or the member's visible/project-scoped teams for member read-only callers."
+ ),
+ usage_types: BillingSpendRetrieveQueryParams.shape['usage_types'].describe(
+ 'JSON-encoded array of usage type identifiers to filter on, NOT a comma-separated string. Pass as e.g. `["event_count_in_period"]` or `["event_count_in_period","recording_count_in_period"]`. Omit for all usage types.'
+ ),
+ breakdowns: BillingSpendRetrieveQueryParams.shape['breakdowns'].describe(
+ 'JSON-encoded array of dimensions to break down by, NOT a comma-separated string. Valid dimensions are "type" (by usage type) and "team" (by project). Pass `["type"]` for per-usage-type series, or `["type","team"]` for per-project series within each usage type. Team breakdowns require "type"; do not pass `["team"]` by itself. Omit for a single aggregate series. Sending a bare string like "type,team" will fail with a 400 error.'
+ ),
+ interval: BillingSpendRetrieveQueryParams.shape['interval'].describe(
+ 'Time bucket size, one of "day" or "week". Default "day".'
+ ),
+ })
+}
const billingSpendGet = (): ToolBase<
- typeof BillingSpendGetSchema,
+ ReturnType<typeof BillingSpendGetSchema>,
WithInformationalResponse<Schemas.BillingTimeSeriesResponse>
> => ({
name: 'billing-spend-get',
- schema: BillingSpendGetSchema,
- handler: async (context: Context, params: z.infer<typeof BillingSpendGetSchema>) => {
+ schema: BillingSpendGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof BillingSpendGetSchema>>) => {
const result = await context.api.request<Schemas.BillingTimeSeriesResponse>({
method: 'GET',
path: `/api/billing/spend/`,
@@ -98,34 +103,37 @@ const billingSpendGet = (): ToolBase<
},
})
-const BillingUsageGetSchema = BillingUsageRetrieveQueryParams.extend({
- start_date: BillingUsageRetrieveQueryParams.shape['start_date'].describe(
- 'Start date (YYYY-MM-DD). For open-ended investigations, choose an explicit recent window such as the last 30 days. If you use "all", also pass end_date.'
- ),
- end_date: BillingUsageRetrieveQueryParams.shape['end_date'].describe(
- "End date (YYYY-MM-DD), inclusive. Pass this whenever start_date is set; use today's date if the user did not name one."
- ),
- team_ids: BillingUsageRetrieveQueryParams.shape['team_ids'].describe(
- "JSON-encoded array of numeric team (project) IDs to filter by, NOT a comma-separated string. Pass as e.g. `[1,2]`. Omit for every project this request can see: all org teams for full billing-access callers, or the member's visible/project-scoped teams for member read-only callers."
- ),
- usage_types: BillingUsageRetrieveQueryParams.shape['usage_types'].describe(
- 'JSON-encoded array of usage type identifiers to filter on, NOT a comma-separated string. Pass as e.g. `["event_count_in_period"]` or `["event_count_in_period","recording_count_in_period"]`. Omit for all usage types.'
- ),
- breakdowns: BillingUsageRetrieveQueryParams.shape['breakdowns'].describe(
- 'JSON-encoded array of dimensions to break down by, NOT a comma-separated string. Valid dimensions are "type" (by usage type) and "team" (by project). Pass `["type"]` for per-usage-type series, or `["type","team"]` for per-project series within each usage type. Team breakdowns require "type"; do not pass `["team"]` by itself. Omit for a single aggregate series. Sending a bare string like "type,team" will fail with a 400 error.'
- ),
- interval: BillingUsageRetrieveQueryParams.shape['interval'].describe(
- 'Time bucket size, one of "day" or "week". Default "day".'
- ),
-})
+const BillingUsageGetSchema = () => {
+ const BillingUsageRetrieveQueryParams = orvalSchemas.BillingUsageRetrieveQueryParams()
+ return BillingUsageRetrieveQueryParams.extend({
+ start_date: BillingUsageRetrieveQueryParams.shape['start_date'].describe(
+ 'Start date (YYYY-MM-DD). For open-ended investigations, choose an explicit recent window such as the last 30 days. If you use "all", also pass end_date.'
+ ),
+ end_date: BillingUsageRetrieveQueryParams.shape['end_date'].describe(
+ "End date (YYYY-MM-DD), inclusive. Pass this whenever start_date is set; use today's date if the user did not name one."
+ ),
+ team_ids: BillingUsageRetrieveQueryParams.shape['team_ids'].describe(
+ "JSON-encoded array of numeric team (project) IDs to filter by, NOT a comma-separated string. Pass as e.g. `[1,2]`. Omit for every project this request can see: all org teams for full billing-access callers, or the member's visible/project-scoped teams for member read-only callers."
+ ),
+ usage_types: BillingUsageRetrieveQueryParams.shape['usage_types'].describe(
+ 'JSON-encoded array of usage type identifiers to filter on, NOT a comma-separated string. Pass as e.g. `["event_count_in_period"]` or `["event_count_in_period","recording_count_in_period"]`. Omit for all usage types.'
+ ),
+ breakdowns: BillingUsageRetrieveQueryParams.shape['breakdowns'].describe(
+ 'JSON-encoded array of dimensions to break down by, NOT a comma-separated string. Valid dimensions are "type" (by usage type) and "team" (by project). Pass `["type"]` for per-usage-type series, or `["type","team"]` for per-project series within each usage type. Team breakdowns require "type"; do not pass `["team"]` by itself. Omit for a single aggregate series. Sending a bare string like "type,team" will fail with a 400 error.'
+ ),
+ interval: BillingUsageRetrieveQueryParams.shape['interval'].describe(
+ 'Time bucket size, one of "day" or "week". Default "day".'
+ ),
+ })
+}
const billingUsageGet = (): ToolBase<
- typeof BillingUsageGetSchema,
+ ReturnType<typeof BillingUsageGetSchema>,
WithInformationalResponse<Schemas.BillingTimeSeriesResponse>
> => ({
name: 'billing-usage-get',
- schema: BillingUsageGetSchema,
- handler: async (context: Context, params: z.infer<typeof BillingUsageGetSchema>) => {
+ schema: BillingUsageGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof BillingUsageGetSchema>>) => {
const result = await context.api.request<Schemas.BillingTimeSeriesResponse>({
method: 'GET',
path: `/api/billing/usage/`,
diff --git a/services/mcp/src/tools/generated/billing_alerts.ts b/services/mcp/src/tools/generated/billing_alerts.ts
index 57127b3e8bb6..8f011d9dcf5c 100644
--- a/services/mcp/src/tools/generated/billing_alerts.ts
+++ b/services/mcp/src/tools/generated/billing_alerts.ts
@@ -2,19 +2,21 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- BillingAlertsCreateBody,
- BillingAlertsPartialUpdateBody,
- BillingAlertsPartialUpdateParams,
-} from '@/generated/billing_alerts/api'
+import * as orvalSchemas from '@/generated/billing_alerts/api'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const BillingAlertCreateSchema = BillingAlertsCreateBody
+const BillingAlertCreateSchema = () => {
+ const BillingAlertsCreateBody = orvalSchemas.BillingAlertsCreateBody()
+ return BillingAlertsCreateBody
+}
-const billingAlertCreate = (): ToolBase<typeof BillingAlertCreateSchema, Schemas.BillingAlertConfiguration> => ({
+const billingAlertCreate = (): ToolBase<
+ ReturnType<typeof BillingAlertCreateSchema>,
+ Schemas.BillingAlertConfiguration
+> => ({
name: 'billing-alert-create',
- schema: BillingAlertCreateSchema,
- handler: async (context: Context, params: z.infer<typeof BillingAlertCreateSchema>) => {
+ schema: BillingAlertCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof BillingAlertCreateSchema>>) => {
const orgId = await context.stateManager.getOrgID()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -65,14 +67,19 @@ const billingAlertCreate = (): ToolBase<typeof BillingAlertCreateSchema, Schemas
},
})
-const BillingAlertUpdateSchema = BillingAlertsPartialUpdateParams.omit({ organization_id: true }).extend(
- BillingAlertsPartialUpdateBody.shape
-)
+const BillingAlertUpdateSchema = () => {
+ const BillingAlertsPartialUpdateBody = orvalSchemas.BillingAlertsPartialUpdateBody()
+ const BillingAlertsPartialUpdateParams = orvalSchemas.BillingAlertsPartialUpdateParams()
+ return BillingAlertsPartialUpdateParams.omit({ organization_id: true }).extend(BillingAlertsPartialUpdateBody.shape)
+}
-const billingAlertUpdate = (): ToolBase<typeof BillingAlertUpdateSchema, Schemas.BillingAlertConfiguration> => ({
+const billingAlertUpdate = (): ToolBase<
+ ReturnType<typeof BillingAlertUpdateSchema>,
+ Schemas.BillingAlertConfiguration
+> => ({
name: 'billing-alert-update',
- schema: BillingAlertUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof BillingAlertUpdateSchema>) => {
+ schema: BillingAlertUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof BillingAlertUpdateSchema>>) => {
const orgId = await context.stateManager.getOrgID()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
diff --git a/services/mcp/src/tools/generated/business_knowledge.ts b/services/mcp/src/tools/generated/business_knowledge.ts
index b1736d6b493c..72d25fb0817e 100644
--- a/services/mcp/src/tools/generated/business_knowledge.ts
+++ b/services/mcp/src/tools/generated/business_knowledge.ts
@@ -2,31 +2,30 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- BusinessKnowledgeDocumentsSearchListQueryParams,
- BusinessKnowledgeDocumentsWindowListParams,
- BusinessKnowledgeDocumentsWindowListQueryParams,
- BusinessKnowledgeSourcesCreateBody,
- BusinessKnowledgeSourcesListQueryParams,
- BusinessKnowledgeSourcesPartialUpdateBody,
- BusinessKnowledgeSourcesPartialUpdateParams,
- BusinessKnowledgeSourcesRetrieveParams,
-} from '@/generated/business_knowledge/api'
+import * as orvalSchemas from '@/generated/business_knowledge/api'
import { BusinessKnowledgeUrlSourceCreateSchema } from '@/schema/tool-inputs'
import { withPostHogUrl, pickResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const BusinessKnowledgeDocumentWindowRetrieveSchema = BusinessKnowledgeDocumentsWindowListParams.omit({
- project_id: true,
-}).extend(BusinessKnowledgeDocumentsWindowListQueryParams.shape)
+const BusinessKnowledgeDocumentWindowRetrieveSchema = () => {
+ const BusinessKnowledgeDocumentsWindowListParams = orvalSchemas.BusinessKnowledgeDocumentsWindowListParams()
+ const BusinessKnowledgeDocumentsWindowListQueryParams =
+ orvalSchemas.BusinessKnowledgeDocumentsWindowListQueryParams()
+ return BusinessKnowledgeDocumentsWindowListParams.omit({ project_id: true }).extend(
+ BusinessKnowledgeDocumentsWindowListQueryParams.shape
+ )
+}
const businessKnowledgeDocumentWindowRetrieve = (): ToolBase<
- typeof BusinessKnowledgeDocumentWindowRetrieveSchema,
+ ReturnType<typeof BusinessKnowledgeDocumentWindowRetrieveSchema>,
Schemas.KnowledgeDocumentWindow[]
> => ({
name: 'business-knowledge-document-window-retrieve',
- schema: BusinessKnowledgeDocumentWindowRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof BusinessKnowledgeDocumentWindowRetrieveSchema>) => {
+ schema: BusinessKnowledgeDocumentWindowRetrieveSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof BusinessKnowledgeDocumentWindowRetrieveSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.KnowledgeDocumentWindow[]>({
method: 'GET',
@@ -40,15 +39,19 @@ const businessKnowledgeDocumentWindowRetrieve = (): ToolBase<
},
})
-const BusinessKnowledgeDocumentsSearchSchema = BusinessKnowledgeDocumentsSearchListQueryParams
+const BusinessKnowledgeDocumentsSearchSchema = () => {
+ const BusinessKnowledgeDocumentsSearchListQueryParams =
+ orvalSchemas.BusinessKnowledgeDocumentsSearchListQueryParams()
+ return BusinessKnowledgeDocumentsSearchListQueryParams
+}
const businessKnowledgeDocumentsSearch = (): ToolBase<
- typeof BusinessKnowledgeDocumentsSearchSchema,
+ ReturnType<typeof BusinessKnowledgeDocumentsSearchSchema>,
Schemas.KnowledgeSearchResult[]
> => ({
name: 'business-knowledge-documents-search',
- schema: BusinessKnowledgeDocumentsSearchSchema,
- handler: async (context: Context, params: z.infer<typeof BusinessKnowledgeDocumentsSearchSchema>) => {
+ schema: BusinessKnowledgeDocumentsSearchSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof BusinessKnowledgeDocumentsSearchSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.KnowledgeSearchResult[]>({
method: 'GET',
@@ -63,15 +66,18 @@ const businessKnowledgeDocumentsSearch = (): ToolBase<
},
})
-const BusinessKnowledgeSourcesListSchema = BusinessKnowledgeSourcesListQueryParams
+const BusinessKnowledgeSourcesListSchema = () => {
+ const BusinessKnowledgeSourcesListQueryParams = orvalSchemas.BusinessKnowledgeSourcesListQueryParams()
+ return BusinessKnowledgeSourcesListQueryParams
+}
const businessKnowledgeSourcesList = (): ToolBase<
- typeof BusinessKnowledgeSourcesListSchema,
+ ReturnType<typeof BusinessKnowledgeSourcesListSchema>,
WithPostHogUrl<Schemas.PaginatedKnowledgeSourceList>
> => ({
name: 'business-knowledge-sources-list',
- schema: BusinessKnowledgeSourcesListSchema,
- handler: async (context: Context, params: z.infer<typeof BusinessKnowledgeSourcesListSchema>) => {
+ schema: BusinessKnowledgeSourcesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof BusinessKnowledgeSourcesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedKnowledgeSourceList>({
method: 'GET',
@@ -106,17 +112,24 @@ const businessKnowledgeSourcesList = (): ToolBase<
},
})
-const BusinessKnowledgeSourcesPartialUpdateSchema = BusinessKnowledgeSourcesPartialUpdateParams.omit({
- project_id: true,
-}).extend(BusinessKnowledgeSourcesPartialUpdateBody.shape)
+const BusinessKnowledgeSourcesPartialUpdateSchema = () => {
+ const BusinessKnowledgeSourcesPartialUpdateBody = orvalSchemas.BusinessKnowledgeSourcesPartialUpdateBody()
+ const BusinessKnowledgeSourcesPartialUpdateParams = orvalSchemas.BusinessKnowledgeSourcesPartialUpdateParams()
+ return BusinessKnowledgeSourcesPartialUpdateParams.omit({ project_id: true }).extend(
+ BusinessKnowledgeSourcesPartialUpdateBody.shape
+ )
+}
const businessKnowledgeSourcesPartialUpdate = (): ToolBase<
- typeof BusinessKnowledgeSourcesPartialUpdateSchema,
+ ReturnType<typeof BusinessKnowledgeSourcesPartialUpdateSchema>,
Schemas.KnowledgeSource
> => ({
name: 'business-knowledge-sources-partial-update',
- schema: BusinessKnowledgeSourcesPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof BusinessKnowledgeSourcesPartialUpdateSchema>) => {
+ schema: BusinessKnowledgeSourcesPartialUpdateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof BusinessKnowledgeSourcesPartialUpdateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -137,15 +150,18 @@ const businessKnowledgeSourcesPartialUpdate = (): ToolBase<
},
})
-const BusinessKnowledgeSourcesRetrieveSchema = BusinessKnowledgeSourcesRetrieveParams.omit({ project_id: true })
+const BusinessKnowledgeSourcesRetrieveSchema = () => {
+ const BusinessKnowledgeSourcesRetrieveParams = orvalSchemas.BusinessKnowledgeSourcesRetrieveParams()
+ return BusinessKnowledgeSourcesRetrieveParams.omit({ project_id: true })
+}
const businessKnowledgeSourcesRetrieve = (): ToolBase<
- typeof BusinessKnowledgeSourcesRetrieveSchema,
+ ReturnType<typeof BusinessKnowledgeSourcesRetrieveSchema>,
Schemas.KnowledgeSource
> => ({
name: 'business-knowledge-sources-retrieve',
- schema: BusinessKnowledgeSourcesRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof BusinessKnowledgeSourcesRetrieveSchema>) => {
+ schema: BusinessKnowledgeSourcesRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof BusinessKnowledgeSourcesRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.KnowledgeSource>({
method: 'GET',
@@ -155,15 +171,18 @@ const businessKnowledgeSourcesRetrieve = (): ToolBase<
},
})
-const BusinessKnowledgeSourcesTextCreateSchema = BusinessKnowledgeSourcesCreateBody
+const BusinessKnowledgeSourcesTextCreateSchema = () => {
+ const BusinessKnowledgeSourcesCreateBody = orvalSchemas.BusinessKnowledgeSourcesCreateBody()
+ return BusinessKnowledgeSourcesCreateBody
+}
const businessKnowledgeSourcesTextCreate = (): ToolBase<
- typeof BusinessKnowledgeSourcesTextCreateSchema,
+ ReturnType<typeof BusinessKnowledgeSourcesTextCreateSchema>,
Schemas.KnowledgeSource
> => ({
name: 'business-knowledge-sources-text-create',
- schema: BusinessKnowledgeSourcesTextCreateSchema,
- handler: async (context: Context, params: z.infer<typeof BusinessKnowledgeSourcesTextCreateSchema>) => {
+ schema: BusinessKnowledgeSourcesTextCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof BusinessKnowledgeSourcesTextCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -184,17 +203,17 @@ const businessKnowledgeSourcesTextCreate = (): ToolBase<
},
})
-const BusinessKnowledgeSourcesUrlCreateSchema = BusinessKnowledgeUrlSourceCreateSchema
+const BusinessKnowledgeSourcesUrlCreateSchema = () => BusinessKnowledgeUrlSourceCreateSchema
const businessKnowledgeSourcesUrlCreate = (): ToolBase<
- typeof BusinessKnowledgeSourcesUrlCreateSchema,
+ ReturnType<typeof BusinessKnowledgeSourcesUrlCreateSchema>,
Schemas.KnowledgeSource
> => ({
name: 'business-knowledge-sources-url-create',
- schema: BusinessKnowledgeSourcesUrlCreateSchema,
- handler: async (context: Context, params: z.infer<typeof BusinessKnowledgeSourcesUrlCreateSchema>) => {
+ schema: BusinessKnowledgeSourcesUrlCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof BusinessKnowledgeSourcesUrlCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
- const parsedParams = BusinessKnowledgeSourcesUrlCreateSchema.parse(params)
+ const parsedParams = BusinessKnowledgeSourcesUrlCreateSchema().parse(params)
const result = await context.api.request<Schemas.KnowledgeSource>({
method: 'POST',
path: `/api/projects/${encodeURIComponent(String(projectId))}/business_knowledge/sources/`,
diff --git a/services/mcp/src/tools/generated/canvas.ts b/services/mcp/src/tools/generated/canvas.ts
index 5be884ba320e..de08b51ae2bd 100644
--- a/services/mcp/src/tools/generated/canvas.ts
+++ b/services/mcp/src/tools/generated/canvas.ts
@@ -2,47 +2,24 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- CanvasesBuildsRetrieveParams,
- CanvasesBuildsRetrieveQueryParams,
- CanvasesCreateBody,
- CanvasesDraftCreateBody,
- CanvasesDraftCreateParams,
- CanvasesDraftsRetrieveParams,
- CanvasesDraftsRetrieveQueryParams,
- CanvasesEditCreateBody,
- CanvasesEditCreateParams,
- CanvasesLayoutPatchCreateBody,
- CanvasesLayoutPatchCreateParams,
- CanvasesLayoutPublishCreateBody,
- CanvasesLayoutPublishCreateParams,
- CanvasesLayoutRetrieveParams,
- CanvasesListQueryParams,
- CanvasesPromoteCreateBody,
- CanvasesPromoteCreateParams,
- CanvasesPublishCreateBody,
- CanvasesPublishCreateParams,
- CanvasesPublishCurrentVersionCreateBody,
- CanvasesPublishCurrentVersionCreateParams,
- CanvasesSourceRetrieveParams,
- CanvasesSourceRetrieveQueryParams,
- CanvasesStateRetrieveParams,
- CanvasesStateRetrieveQueryParams,
- CanvasesStateSetBody,
- CanvasesStateSetParams,
- CanvasesValidateCreateBody,
- CanvasesValidateCreateParams,
-} from '@/generated/canvas/api'
+import * as orvalSchemas from '@/generated/canvas/api'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const CanvasBuildsRetrieveSchema = CanvasesBuildsRetrieveParams.omit({ project_id: true })
- .extend(CanvasesBuildsRetrieveQueryParams.shape)
- .extend({ id: CanvasesBuildsRetrieveParams.shape['id'].describe('ID of the canvas whose builds to read.') })
+const CanvasBuildsRetrieveSchema = () => {
+ const CanvasesBuildsRetrieveParams = orvalSchemas.CanvasesBuildsRetrieveParams()
+ const CanvasesBuildsRetrieveQueryParams = orvalSchemas.CanvasesBuildsRetrieveQueryParams()
+ return CanvasesBuildsRetrieveParams.omit({ project_id: true })
+ .extend(CanvasesBuildsRetrieveQueryParams.shape)
+ .extend({ id: CanvasesBuildsRetrieveParams.shape['id'].describe('ID of the canvas whose builds to read.') })
+}
-const canvasBuildsRetrieve = (): ToolBase<typeof CanvasBuildsRetrieveSchema, Schemas.CanvasBuildsResponse> => ({
+const canvasBuildsRetrieve = (): ToolBase<
+ ReturnType<typeof CanvasBuildsRetrieveSchema>,
+ Schemas.CanvasBuildsResponse
+> => ({
name: 'canvas-builds-retrieve',
- schema: CanvasBuildsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof CanvasBuildsRetrieveSchema>) => {
+ schema: CanvasBuildsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CanvasBuildsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.CanvasBuildsResponse>({
method: 'GET',
@@ -55,22 +32,25 @@ const canvasBuildsRetrieve = (): ToolBase<typeof CanvasBuildsRetrieveSchema, Sch
},
})
-const CanvasCreateSchema = CanvasesCreateBody.extend({
- channel_id: CanvasesCreateBody.shape['channel_id'].describe(
- "Id of the channel to create the canvas in — the channel the task was created in, from the task's context. Use channel-list only to resolve a channel the user named; never pick a channel from the listing yourself (the personal #me channel is not a default)."
- ),
- kind: CanvasesCreateBody.shape['kind'].describe(
- "What to create: 'freeform' (a standalone app — the default), 'component' (a reusable widget for grid canvases; its published project must declare a `component` placement contract), or 'grid' (a composition of components, edited via canvas-layout-patch). See canvas-list (kind=component) before creating a component."
- ),
- description: CanvasesCreateBody.shape['description'].describe(
- 'Short prose describing the canvas. For components this is the store-search text — say what the widget shows and what its config controls, so future searches find it.'
- ),
-})
+const CanvasCreateSchema = () => {
+ const CanvasesCreateBody = orvalSchemas.CanvasesCreateBody()
+ return CanvasesCreateBody.extend({
+ channel_id: CanvasesCreateBody.shape['channel_id'].describe(
+ "Id of the channel to create the canvas in — the channel the task was created in, from the task's context. Use channel-list only to resolve a channel the user named; never pick a channel from the listing yourself (the personal #me channel is not a default)."
+ ),
+ kind: CanvasesCreateBody.shape['kind'].describe(
+ "What to create: 'freeform' (a standalone app — the default), 'component' (a reusable widget for grid canvases; its published project must declare a `component` placement contract), or 'grid' (a composition of components, edited via canvas-layout-patch). See canvas-list (kind=component) before creating a component."
+ ),
+ description: CanvasesCreateBody.shape['description'].describe(
+ 'Short prose describing the canvas. For components this is the store-search text — say what the widget shows and what its config controls, so future searches find it.'
+ ),
+ })
+}
-const canvasCreate = (): ToolBase<typeof CanvasCreateSchema, Schemas.Canvas> => ({
+const canvasCreate = (): ToolBase<ReturnType<typeof CanvasCreateSchema>, Schemas.Canvas> => ({
name: 'canvas-create',
- schema: CanvasCreateSchema,
- handler: async (context: Context, params: z.infer<typeof CanvasCreateSchema>) => {
+ schema: CanvasCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CanvasCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -97,14 +77,21 @@ const canvasCreate = (): ToolBase<typeof CanvasCreateSchema, Schemas.Canvas> =>
},
})
-const CanvasDraftCreateSchema = CanvasesDraftCreateParams.omit({ project_id: true })
- .extend(CanvasesDraftCreateBody.shape)
- .extend({ id: CanvasesDraftCreateParams.shape['id'].describe('ID of the canvas to stage a draft for.') })
+const CanvasDraftCreateSchema = () => {
+ const CanvasesDraftCreateBody = orvalSchemas.CanvasesDraftCreateBody()
+ const CanvasesDraftCreateParams = orvalSchemas.CanvasesDraftCreateParams()
+ return CanvasesDraftCreateParams.omit({ project_id: true })
+ .extend(CanvasesDraftCreateBody.shape)
+ .extend({ id: CanvasesDraftCreateParams.shape['id'].describe('ID of the canvas to stage a draft for.') })
+}
-const canvasDraftCreate = (): ToolBase<typeof CanvasDraftCreateSchema, Schemas.CanvasSourceDraftResponse> => ({
+const canvasDraftCreate = (): ToolBase<
+ ReturnType<typeof CanvasDraftCreateSchema>,
+ Schemas.CanvasSourceDraftResponse
+> => ({
name: 'canvas-draft-create',
- schema: CanvasDraftCreateSchema,
- handler: async (context: Context, params: z.infer<typeof CanvasDraftCreateSchema>) => {
+ schema: CanvasDraftCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CanvasDraftCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.project !== undefined) {
@@ -122,14 +109,21 @@ const canvasDraftCreate = (): ToolBase<typeof CanvasDraftCreateSchema, Schemas.C
},
})
-const CanvasDraftsRetrieveSchema = CanvasesDraftsRetrieveParams.omit({ project_id: true })
- .extend(CanvasesDraftsRetrieveQueryParams.shape)
- .extend({ id: CanvasesDraftsRetrieveParams.shape['id'].describe('ID of the canvas whose drafts to list.') })
+const CanvasDraftsRetrieveSchema = () => {
+ const CanvasesDraftsRetrieveParams = orvalSchemas.CanvasesDraftsRetrieveParams()
+ const CanvasesDraftsRetrieveQueryParams = orvalSchemas.CanvasesDraftsRetrieveQueryParams()
+ return CanvasesDraftsRetrieveParams.omit({ project_id: true })
+ .extend(CanvasesDraftsRetrieveQueryParams.shape)
+ .extend({ id: CanvasesDraftsRetrieveParams.shape['id'].describe('ID of the canvas whose drafts to list.') })
+}
-const canvasDraftsRetrieve = (): ToolBase<typeof CanvasDraftsRetrieveSchema, Schemas.PaginatedCanvasDraftList> => ({
+const canvasDraftsRetrieve = (): ToolBase<
+ ReturnType<typeof CanvasDraftsRetrieveSchema>,
+ Schemas.PaginatedCanvasDraftList
+> => ({
name: 'canvas-drafts-retrieve',
- schema: CanvasDraftsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof CanvasDraftsRetrieveSchema>) => {
+ schema: CanvasDraftsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CanvasDraftsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedCanvasDraftList>({
method: 'GET',
@@ -143,14 +137,21 @@ const canvasDraftsRetrieve = (): ToolBase<typeof CanvasDraftsRetrieveSchema, Sch
},
})
-const CanvasEditCreateSchema = CanvasesEditCreateParams.omit({ project_id: true })
- .extend(CanvasesEditCreateBody.shape)
- .extend({ id: CanvasesEditCreateParams.shape['id'].describe('ID of the canvas whose source to edit.') })
+const CanvasEditCreateSchema = () => {
+ const CanvasesEditCreateBody = orvalSchemas.CanvasesEditCreateBody()
+ const CanvasesEditCreateParams = orvalSchemas.CanvasesEditCreateParams()
+ return CanvasesEditCreateParams.omit({ project_id: true })
+ .extend(CanvasesEditCreateBody.shape)
+ .extend({ id: CanvasesEditCreateParams.shape['id'].describe('ID of the canvas whose source to edit.') })
+}
-const canvasEditCreate = (): ToolBase<typeof CanvasEditCreateSchema, Schemas.CanvasSourcePublishResponse> => ({
+const canvasEditCreate = (): ToolBase<
+ ReturnType<typeof CanvasEditCreateSchema>,
+ Schemas.CanvasSourcePublishResponse
+> => ({
name: 'canvas-edit-create',
- schema: CanvasEditCreateSchema,
- handler: async (context: Context, params: z.infer<typeof CanvasEditCreateSchema>) => {
+ schema: CanvasEditCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CanvasEditCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.operations !== undefined) {
@@ -174,14 +175,17 @@ const canvasEditCreate = (): ToolBase<typeof CanvasEditCreateSchema, Schemas.Can
},
})
-const CanvasLayoutGetSchema = CanvasesLayoutRetrieveParams.omit({ project_id: true }).extend({
- id: CanvasesLayoutRetrieveParams.shape['id'].describe('ID of the grid canvas whose layout to read.'),
-})
+const CanvasLayoutGetSchema = () => {
+ const CanvasesLayoutRetrieveParams = orvalSchemas.CanvasesLayoutRetrieveParams()
+ return CanvasesLayoutRetrieveParams.omit({ project_id: true }).extend({
+ id: CanvasesLayoutRetrieveParams.shape['id'].describe('ID of the grid canvas whose layout to read.'),
+ })
+}
-const canvasLayoutGet = (): ToolBase<typeof CanvasLayoutGetSchema, Schemas.CanvasLayoutResponse> => ({
+const canvasLayoutGet = (): ToolBase<ReturnType<typeof CanvasLayoutGetSchema>, Schemas.CanvasLayoutResponse> => ({
name: 'canvas-layout-get',
- schema: CanvasLayoutGetSchema,
- handler: async (context: Context, params: z.infer<typeof CanvasLayoutGetSchema>) => {
+ schema: CanvasLayoutGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CanvasLayoutGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.CanvasLayoutResponse>({
method: 'GET',
@@ -191,16 +195,23 @@ const canvasLayoutGet = (): ToolBase<typeof CanvasLayoutGetSchema, Schemas.Canva
},
})
-const CanvasLayoutPatchSchema = CanvasesLayoutPatchCreateParams.omit({ project_id: true })
- .extend(CanvasesLayoutPatchCreateBody.shape)
- .extend({
- id: CanvasesLayoutPatchCreateParams.shape['id'].describe('ID of the grid canvas whose layout to patch.'),
- })
+const CanvasLayoutPatchSchema = () => {
+ const CanvasesLayoutPatchCreateBody = orvalSchemas.CanvasesLayoutPatchCreateBody()
+ const CanvasesLayoutPatchCreateParams = orvalSchemas.CanvasesLayoutPatchCreateParams()
+ return CanvasesLayoutPatchCreateParams.omit({ project_id: true })
+ .extend(CanvasesLayoutPatchCreateBody.shape)
+ .extend({
+ id: CanvasesLayoutPatchCreateParams.shape['id'].describe('ID of the grid canvas whose layout to patch.'),
+ })
+}
-const canvasLayoutPatch = (): ToolBase<typeof CanvasLayoutPatchSchema, Schemas.CanvasLayoutPublishResponse> => ({
+const canvasLayoutPatch = (): ToolBase<
+ ReturnType<typeof CanvasLayoutPatchSchema>,
+ Schemas.CanvasLayoutPublishResponse
+> => ({
name: 'canvas-layout-patch',
- schema: CanvasLayoutPatchSchema,
- handler: async (context: Context, params: z.infer<typeof CanvasLayoutPatchSchema>) => {
+ schema: CanvasLayoutPatchSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CanvasLayoutPatchSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.operations !== undefined) {
@@ -221,21 +232,30 @@ const canvasLayoutPatch = (): ToolBase<typeof CanvasLayoutPatchSchema, Schemas.C
},
})
-const CanvasLayoutPublishSchema = CanvasesLayoutPublishCreateParams.omit({ project_id: true })
- .extend(CanvasesLayoutPublishCreateBody.shape)
- .extend({
- id: CanvasesLayoutPublishCreateParams.shape['id'].describe('ID of the grid canvas whose layout to publish.'),
- expected_current_version_id: CanvasesLayoutPublishCreateBody.shape['expected_current_version_id']
- .unwrap()
- .describe(
- 'The `current_version_id` this document was built on, from canvas-layout-get (null only for a grid canvas that has never published a layout). A whole document replaces the head, so without the guard a layout the user changed after you read it is silently discarded.'
+const CanvasLayoutPublishSchema = () => {
+ const CanvasesLayoutPublishCreateBody = orvalSchemas.CanvasesLayoutPublishCreateBody()
+ const CanvasesLayoutPublishCreateParams = orvalSchemas.CanvasesLayoutPublishCreateParams()
+ return CanvasesLayoutPublishCreateParams.omit({ project_id: true })
+ .extend(CanvasesLayoutPublishCreateBody.shape)
+ .extend({
+ id: CanvasesLayoutPublishCreateParams.shape['id'].describe(
+ 'ID of the grid canvas whose layout to publish.'
),
- })
+ expected_current_version_id: CanvasesLayoutPublishCreateBody.shape['expected_current_version_id']
+ .unwrap()
+ .describe(
+ 'The `current_version_id` this document was built on, from canvas-layout-get (null only for a grid canvas that has never published a layout). A whole document replaces the head, so without the guard a layout the user changed after you read it is silently discarded.'
+ ),
+ })
+}
-const canvasLayoutPublish = (): ToolBase<typeof CanvasLayoutPublishSchema, Schemas.CanvasLayoutPublishResponse> => ({
+const canvasLayoutPublish = (): ToolBase<
+ ReturnType<typeof CanvasLayoutPublishSchema>,
+ Schemas.CanvasLayoutPublishResponse
+> => ({
name: 'canvas-layout-publish',
- schema: CanvasLayoutPublishSchema,
- handler: async (context: Context, params: z.infer<typeof CanvasLayoutPublishSchema>) => {
+ schema: CanvasLayoutPublishSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CanvasLayoutPublishSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.layout !== undefined) {
@@ -256,20 +276,25 @@ const canvasLayoutPublish = (): ToolBase<typeof CanvasLayoutPublishSchema, Schem
},
})
-const CanvasListSchema = CanvasesListQueryParams.extend({
- channel: CanvasesListQueryParams.shape['channel'].describe('Only return canvases in this channel (channel id).'),
- kind: CanvasesListQueryParams.shape['kind'].describe(
- 'Only return canvases of this kind. kind=component lists the component store.'
- ),
- search: CanvasesListQueryParams.shape['search'].describe(
- 'Case-insensitive match on name and description — use to find store components by what they show.'
- ),
-})
+const CanvasListSchema = () => {
+ const CanvasesListQueryParams = orvalSchemas.CanvasesListQueryParams()
+ return CanvasesListQueryParams.extend({
+ channel: CanvasesListQueryParams.shape['channel'].describe(
+ 'Only return canvases in this channel (channel id).'
+ ),
+ kind: CanvasesListQueryParams.shape['kind'].describe(
+ 'Only return canvases of this kind. kind=component lists the component store.'
+ ),
+ search: CanvasesListQueryParams.shape['search'].describe(
+ 'Case-insensitive match on name and description — use to find store components by what they show.'
+ ),
+ })
+}
-const canvasList = (): ToolBase<typeof CanvasListSchema, Schemas.PaginatedCanvasList> => ({
+const canvasList = (): ToolBase<ReturnType<typeof CanvasListSchema>, Schemas.PaginatedCanvasList> => ({
name: 'canvas-list',
- schema: CanvasListSchema,
- handler: async (context: Context, params: z.infer<typeof CanvasListSchema>) => {
+ schema: CanvasListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CanvasListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedCanvasList>({
method: 'GET',
@@ -286,14 +311,18 @@ const canvasList = (): ToolBase<typeof CanvasListSchema, Schemas.PaginatedCanvas
},
})
-const CanvasPromoteCreateSchema = CanvasesPromoteCreateParams.omit({ project_id: true })
- .extend(CanvasesPromoteCreateBody.shape)
- .extend({ id: CanvasesPromoteCreateParams.shape['id'].describe('ID of the canvas whose draft to promote.') })
+const CanvasPromoteCreateSchema = () => {
+ const CanvasesPromoteCreateBody = orvalSchemas.CanvasesPromoteCreateBody()
+ const CanvasesPromoteCreateParams = orvalSchemas.CanvasesPromoteCreateParams()
+ return CanvasesPromoteCreateParams.omit({ project_id: true })
+ .extend(CanvasesPromoteCreateBody.shape)
+ .extend({ id: CanvasesPromoteCreateParams.shape['id'].describe('ID of the canvas whose draft to promote.') })
+}
-const canvasPromoteCreate = (): ToolBase<typeof CanvasPromoteCreateSchema, Schemas.CanvasBuild> => ({
+const canvasPromoteCreate = (): ToolBase<ReturnType<typeof CanvasPromoteCreateSchema>, Schemas.CanvasBuild> => ({
name: 'canvas-promote-create',
- schema: CanvasPromoteCreateSchema,
- handler: async (context: Context, params: z.infer<typeof CanvasPromoteCreateSchema>) => {
+ schema: CanvasPromoteCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CanvasPromoteCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.version_id !== undefined) {
@@ -311,14 +340,21 @@ const canvasPromoteCreate = (): ToolBase<typeof CanvasPromoteCreateSchema, Schem
},
})
-const CanvasPublishCreateSchema = CanvasesPublishCreateParams.omit({ project_id: true })
- .extend(CanvasesPublishCreateBody.shape)
- .extend({ id: CanvasesPublishCreateParams.shape['id'].describe('ID of the canvas whose source to publish.') })
+const CanvasPublishCreateSchema = () => {
+ const CanvasesPublishCreateBody = orvalSchemas.CanvasesPublishCreateBody()
+ const CanvasesPublishCreateParams = orvalSchemas.CanvasesPublishCreateParams()
+ return CanvasesPublishCreateParams.omit({ project_id: true })
+ .extend(CanvasesPublishCreateBody.shape)
+ .extend({ id: CanvasesPublishCreateParams.shape['id'].describe('ID of the canvas whose source to publish.') })
+}
-const canvasPublishCreate = (): ToolBase<typeof CanvasPublishCreateSchema, Schemas.CanvasSourcePublishResponse> => ({
+const canvasPublishCreate = (): ToolBase<
+ ReturnType<typeof CanvasPublishCreateSchema>,
+ Schemas.CanvasSourcePublishResponse
+> => ({
name: 'canvas-publish-create',
- schema: CanvasPublishCreateSchema,
- handler: async (context: Context, params: z.infer<typeof CanvasPublishCreateSchema>) => {
+ schema: CanvasPublishCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CanvasPublishCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.project !== undefined) {
@@ -342,14 +378,21 @@ const canvasPublishCreate = (): ToolBase<typeof CanvasPublishCreateSchema, Schem
},
})
-const CanvasPublishCurrentVersionSchema = CanvasesPublishCurrentVersionCreateParams.omit({ project_id: true }).extend(
- CanvasesPublishCurrentVersionCreateBody.shape
-)
+const CanvasPublishCurrentVersionSchema = () => {
+ const CanvasesPublishCurrentVersionCreateBody = orvalSchemas.CanvasesPublishCurrentVersionCreateBody()
+ const CanvasesPublishCurrentVersionCreateParams = orvalSchemas.CanvasesPublishCurrentVersionCreateParams()
+ return CanvasesPublishCurrentVersionCreateParams.omit({ project_id: true }).extend(
+ CanvasesPublishCurrentVersionCreateBody.shape
+ )
+}
-const canvasPublishCurrentVersion = (): ToolBase<typeof CanvasPublishCurrentVersionSchema, Schemas.CanvasBuild> => ({
+const canvasPublishCurrentVersion = (): ToolBase<
+ ReturnType<typeof CanvasPublishCurrentVersionSchema>,
+ Schemas.CanvasBuild
+> => ({
name: 'canvas-publish-current-version',
- schema: CanvasPublishCurrentVersionSchema,
- handler: async (context: Context, params: z.infer<typeof CanvasPublishCurrentVersionSchema>) => {
+ schema: CanvasPublishCurrentVersionSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CanvasPublishCurrentVersionSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.expected_current_version_id !== undefined) {
@@ -364,14 +407,21 @@ const canvasPublishCurrentVersion = (): ToolBase<typeof CanvasPublishCurrentVers
},
})
-const CanvasSourceRetrieveSchema = CanvasesSourceRetrieveParams.omit({ project_id: true })
- .extend(CanvasesSourceRetrieveQueryParams.shape)
- .extend({ id: CanvasesSourceRetrieveParams.shape['id'].describe('ID of the canvas whose source to read.') })
+const CanvasSourceRetrieveSchema = () => {
+ const CanvasesSourceRetrieveParams = orvalSchemas.CanvasesSourceRetrieveParams()
+ const CanvasesSourceRetrieveQueryParams = orvalSchemas.CanvasesSourceRetrieveQueryParams()
+ return CanvasesSourceRetrieveParams.omit({ project_id: true })
+ .extend(CanvasesSourceRetrieveQueryParams.shape)
+ .extend({ id: CanvasesSourceRetrieveParams.shape['id'].describe('ID of the canvas whose source to read.') })
+}
-const canvasSourceRetrieve = (): ToolBase<typeof CanvasSourceRetrieveSchema, Schemas.CanvasSourceResponse> => ({
+const canvasSourceRetrieve = (): ToolBase<
+ ReturnType<typeof CanvasSourceRetrieveSchema>,
+ Schemas.CanvasSourceResponse
+> => ({
name: 'canvas-source-retrieve',
- schema: CanvasSourceRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof CanvasSourceRetrieveSchema>) => {
+ schema: CanvasSourceRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CanvasSourceRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.CanvasSourceResponse>({
method: 'GET',
@@ -384,14 +434,19 @@ const canvasSourceRetrieve = (): ToolBase<typeof CanvasSourceRetrieveSchema, Sch
},
})
-const CanvasStateRetrieveSchema = CanvasesStateRetrieveParams.omit({ project_id: true }).extend(
- CanvasesStateRetrieveQueryParams.shape
-)
+const CanvasStateRetrieveSchema = () => {
+ const CanvasesStateRetrieveParams = orvalSchemas.CanvasesStateRetrieveParams()
+ const CanvasesStateRetrieveQueryParams = orvalSchemas.CanvasesStateRetrieveQueryParams()
+ return CanvasesStateRetrieveParams.omit({ project_id: true }).extend(CanvasesStateRetrieveQueryParams.shape)
+}
-const canvasStateRetrieve = (): ToolBase<typeof CanvasStateRetrieveSchema, Schemas.CanvasStateResponse> => ({
+const canvasStateRetrieve = (): ToolBase<
+ ReturnType<typeof CanvasStateRetrieveSchema>,
+ Schemas.CanvasStateResponse
+> => ({
name: 'canvas-state-retrieve',
- schema: CanvasStateRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof CanvasStateRetrieveSchema>) => {
+ schema: CanvasStateRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CanvasStateRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.CanvasStateResponse>({
method: 'GET',
@@ -404,12 +459,16 @@ const canvasStateRetrieve = (): ToolBase<typeof CanvasStateRetrieveSchema, Schem
},
})
-const CanvasStateSetSchema = CanvasesStateSetParams.omit({ project_id: true }).extend(CanvasesStateSetBody.shape)
+const CanvasStateSetSchema = () => {
+ const CanvasesStateSetBody = orvalSchemas.CanvasesStateSetBody()
+ const CanvasesStateSetParams = orvalSchemas.CanvasesStateSetParams()
+ return CanvasesStateSetParams.omit({ project_id: true }).extend(CanvasesStateSetBody.shape)
+}
-const canvasStateSet = (): ToolBase<typeof CanvasStateSetSchema, Schemas.CanvasStateEntry> => ({
+const canvasStateSet = (): ToolBase<ReturnType<typeof CanvasStateSetSchema>, Schemas.CanvasStateEntry> => ({
name: 'canvas-state-set',
- schema: CanvasStateSetSchema,
- handler: async (context: Context, params: z.infer<typeof CanvasStateSetSchema>) => {
+ schema: CanvasStateSetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CanvasStateSetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.scope !== undefined) {
@@ -430,14 +489,21 @@ const canvasStateSet = (): ToolBase<typeof CanvasStateSetSchema, Schemas.CanvasS
},
})
-const CanvasValidateCreateSchema = CanvasesValidateCreateParams.omit({ project_id: true })
- .extend(CanvasesValidateCreateBody.shape)
- .extend({ id: CanvasesValidateCreateParams.shape['id'].describe('ID of the canvas the project is for.') })
+const CanvasValidateCreateSchema = () => {
+ const CanvasesValidateCreateBody = orvalSchemas.CanvasesValidateCreateBody()
+ const CanvasesValidateCreateParams = orvalSchemas.CanvasesValidateCreateParams()
+ return CanvasesValidateCreateParams.omit({ project_id: true })
+ .extend(CanvasesValidateCreateBody.shape)
+ .extend({ id: CanvasesValidateCreateParams.shape['id'].describe('ID of the canvas the project is for.') })
+}
-const canvasValidateCreate = (): ToolBase<typeof CanvasValidateCreateSchema, Schemas.CanvasValidateResponse> => ({
+const canvasValidateCreate = (): ToolBase<
+ ReturnType<typeof CanvasValidateCreateSchema>,
+ Schemas.CanvasValidateResponse
+> => ({
name: 'canvas-validate-create',
- schema: CanvasValidateCreateSchema,
- handler: async (context: Context, params: z.infer<typeof CanvasValidateCreateSchema>) => {
+ schema: CanvasValidateCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CanvasValidateCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.project !== undefined) {
diff --git a/services/mcp/src/tools/generated/cdp_function_templates.ts b/services/mcp/src/tools/generated/cdp_function_templates.ts
index aa988e6593a6..44ab79a5e7c0 100644
--- a/services/mcp/src/tools/generated/cdp_function_templates.ts
+++ b/services/mcp/src/tools/generated/cdp_function_templates.ts
@@ -2,22 +2,22 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- HogFunctionTemplatesListQueryParams,
- HogFunctionTemplatesRetrieveParams,
-} from '@/generated/cdp_function_templates/api'
+import * as orvalSchemas from '@/generated/cdp_function_templates/api'
import { withPostHogUrl, pickResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const CdpFunctionTemplatesListSchema = HogFunctionTemplatesListQueryParams
+const CdpFunctionTemplatesListSchema = () => {
+ const HogFunctionTemplatesListQueryParams = orvalSchemas.HogFunctionTemplatesListQueryParams()
+ return HogFunctionTemplatesListQueryParams
+}
const cdpFunctionTemplatesList = (): ToolBase<
- typeof CdpFunctionTemplatesListSchema,
+ ReturnType<typeof CdpFunctionTemplatesListSchema>,
WithPostHogUrl<Schemas.PaginatedHogFunctionTemplateList>
> => ({
name: 'cdp-function-templates-list',
- schema: CdpFunctionTemplatesListSchema,
- handler: async (context: Context, params: z.infer<typeof CdpFunctionTemplatesListSchema>) => {
+ schema: CdpFunctionTemplatesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CdpFunctionTemplatesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedHogFunctionTemplateList>({
method: 'GET',
@@ -50,15 +50,18 @@ const cdpFunctionTemplatesList = (): ToolBase<
},
})
-const CdpFunctionTemplatesRetrieveSchema = HogFunctionTemplatesRetrieveParams.omit({ project_id: true })
+const CdpFunctionTemplatesRetrieveSchema = () => {
+ const HogFunctionTemplatesRetrieveParams = orvalSchemas.HogFunctionTemplatesRetrieveParams()
+ return HogFunctionTemplatesRetrieveParams.omit({ project_id: true })
+}
const cdpFunctionTemplatesRetrieve = (): ToolBase<
- typeof CdpFunctionTemplatesRetrieveSchema,
+ ReturnType<typeof CdpFunctionTemplatesRetrieveSchema>,
Schemas.HogFunctionTemplate
> => ({
name: 'cdp-function-templates-retrieve',
- schema: CdpFunctionTemplatesRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof CdpFunctionTemplatesRetrieveSchema>) => {
+ schema: CdpFunctionTemplatesRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CdpFunctionTemplatesRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.HogFunctionTemplate>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/cdp_functions.ts b/services/mcp/src/tools/generated/cdp_functions.ts
index ad641047b419..18375b04bf2a 100644
--- a/services/mcp/src/tools/generated/cdp_functions.ts
+++ b/services/mcp/src/tools/generated/cdp_functions.ts
@@ -2,52 +2,35 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- HogFunctionsCreateBody,
- HogFunctionsDestroyParams,
- HogFunctionsDiscardDraftCreateParams,
- HogFunctionsInvocationsCreateBody,
- HogFunctionsInvocationsCreateParams,
- HogFunctionsListQueryParams,
- HogFunctionsLogsRetrieveParams,
- HogFunctionsLogsRetrieveQueryParams,
- HogFunctionsMetricsRetrieveParams,
- HogFunctionsMetricsRetrieveQueryParams,
- HogFunctionsPartialUpdateBody,
- HogFunctionsPartialUpdateParams,
- HogFunctionsPublishCreateBody,
- HogFunctionsPublishCreateParams,
- HogFunctionsRearrangePartialUpdateBody,
- HogFunctionsRetrieveParams,
- HogFunctionsRevisionsListParams,
- HogFunctionsRevisionsListQueryParams,
- HogFunctionsRevisionsRestoreCreateBody,
- HogFunctionsRevisionsRestoreCreateParams,
- HogFunctionsRevisionsRetrieveParams,
-} from '@/generated/cdp_functions/api'
+import * as orvalSchemas from '@/generated/cdp_functions/api'
import { withPostHogUrl, omitResponseFields, pickResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const CdpFunctionsCreateSchema = HogFunctionsCreateBody.extend({
- type: HogFunctionsCreateBody.shape['type'].describe(
- 'Function type. One of: destination, site_destination, internal_destination, source_webhook, warehouse_source_webhook, site_app, transformation.'
- ),
- template_id: HogFunctionsCreateBody.shape['template_id'].describe(
- 'ID of a HogFunctionTemplate to derive defaults from (code, inputs_schema, icon, name, description). Use the cdp-function-templates-list tool to find available templates.'
- ),
- hog: HogFunctionsCreateBody.shape['hog'].describe(
- 'Source code for the function. For most types this is Hog code; for site_destination and site_app types this is TypeScript. Required if no template_id is provided.'
- ),
- enabled: HogFunctionsCreateBody.shape['enabled'].describe('Whether the function is active and processing events.'),
- execution_order: HogFunctionsCreateBody.shape['execution_order'].describe(
- 'Execution priority for transformation functions (lower runs first). Only applies to type=transformation. If omitted, the function is appended at the end.'
- ),
-})
+const CdpFunctionsCreateSchema = () => {
+ const HogFunctionsCreateBody = orvalSchemas.HogFunctionsCreateBody()
+ return HogFunctionsCreateBody.extend({
+ type: HogFunctionsCreateBody.shape['type'].describe(
+ 'Function type. One of: destination, site_destination, internal_destination, source_webhook, warehouse_source_webhook, site_app, transformation.'
+ ),
+ template_id: HogFunctionsCreateBody.shape['template_id'].describe(
+ 'ID of a HogFunctionTemplate to derive defaults from (code, inputs_schema, icon, name, description). Use the cdp-function-templates-list tool to find available templates.'
+ ),
+ hog: HogFunctionsCreateBody.shape['hog'].describe(
+ 'Source code for the function. For most types this is Hog code; for site_destination and site_app types this is TypeScript. Required if no template_id is provided.'
+ ),
+ enabled: HogFunctionsCreateBody.shape['enabled'].describe(
+ 'Whether the function is active and processing events.'
+ ),
+ execution_order: HogFunctionsCreateBody.shape['execution_order'].describe(
+ 'Execution priority for transformation functions (lower runs first). Only applies to type=transformation. If omitted, the function is appended at the end.'
+ ),
+ })
+}
-const cdpFunctionsCreate = (): ToolBase<typeof CdpFunctionsCreateSchema, Schemas.HogFunction> => ({
+const cdpFunctionsCreate = (): ToolBase<ReturnType<typeof CdpFunctionsCreateSchema>, Schemas.HogFunction> => ({
name: 'cdp-functions-create',
- schema: CdpFunctionsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof CdpFunctionsCreateSchema>) => {
+ schema: CdpFunctionsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CdpFunctionsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.type !== undefined) {
@@ -99,12 +82,15 @@ const cdpFunctionsCreate = (): ToolBase<typeof CdpFunctionsCreateSchema, Schemas
},
})
-const CdpFunctionsDeleteSchema = HogFunctionsDestroyParams.omit({ project_id: true })
+const CdpFunctionsDeleteSchema = () => {
+ const HogFunctionsDestroyParams = orvalSchemas.HogFunctionsDestroyParams()
+ return HogFunctionsDestroyParams.omit({ project_id: true })
+}
-const cdpFunctionsDelete = (): ToolBase<typeof CdpFunctionsDeleteSchema, Schemas.HogFunction> => ({
+const cdpFunctionsDelete = (): ToolBase<ReturnType<typeof CdpFunctionsDeleteSchema>, Schemas.HogFunction> => ({
name: 'cdp-functions-delete',
- schema: CdpFunctionsDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof CdpFunctionsDeleteSchema>) => {
+ schema: CdpFunctionsDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CdpFunctionsDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.HogFunction>({
method: 'PATCH',
@@ -115,12 +101,18 @@ const cdpFunctionsDelete = (): ToolBase<typeof CdpFunctionsDeleteSchema, Schemas
},
})
-const CdpFunctionsDiscardDraftSchema = HogFunctionsDiscardDraftCreateParams.omit({ project_id: true })
+const CdpFunctionsDiscardDraftSchema = () => {
+ const HogFunctionsDiscardDraftCreateParams = orvalSchemas.HogFunctionsDiscardDraftCreateParams()
+ return HogFunctionsDiscardDraftCreateParams.omit({ project_id: true })
+}
-const cdpFunctionsDiscardDraft = (): ToolBase<typeof CdpFunctionsDiscardDraftSchema, Schemas.HogFunction> => ({
+const cdpFunctionsDiscardDraft = (): ToolBase<
+ ReturnType<typeof CdpFunctionsDiscardDraftSchema>,
+ Schemas.HogFunction
+> => ({
name: 'cdp-functions-discard-draft',
- schema: CdpFunctionsDiscardDraftSchema,
- handler: async (context: Context, params: z.infer<typeof CdpFunctionsDiscardDraftSchema>) => {
+ schema: CdpFunctionsDiscardDraftSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CdpFunctionsDiscardDraftSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.HogFunction>({
method: 'POST',
@@ -130,12 +122,18 @@ const cdpFunctionsDiscardDraft = (): ToolBase<typeof CdpFunctionsDiscardDraftSch
},
})
-const CdpFunctionsGetRevisionSchema = HogFunctionsRevisionsRetrieveParams.omit({ project_id: true })
+const CdpFunctionsGetRevisionSchema = () => {
+ const HogFunctionsRevisionsRetrieveParams = orvalSchemas.HogFunctionsRevisionsRetrieveParams()
+ return HogFunctionsRevisionsRetrieveParams.omit({ project_id: true })
+}
-const cdpFunctionsGetRevision = (): ToolBase<typeof CdpFunctionsGetRevisionSchema, Schemas.HogFunctionRevision> => ({
+const cdpFunctionsGetRevision = (): ToolBase<
+ ReturnType<typeof CdpFunctionsGetRevisionSchema>,
+ Schemas.HogFunctionRevision
+> => ({
name: 'cdp-functions-get-revision',
- schema: CdpFunctionsGetRevisionSchema,
- handler: async (context: Context, params: z.infer<typeof CdpFunctionsGetRevisionSchema>) => {
+ schema: CdpFunctionsGetRevisionSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CdpFunctionsGetRevisionSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.HogFunctionRevision>({
method: 'GET',
@@ -145,17 +143,21 @@ const cdpFunctionsGetRevision = (): ToolBase<typeof CdpFunctionsGetRevisionSchem
},
})
-const CdpFunctionsInvocationsCreateSchema = HogFunctionsInvocationsCreateParams.omit({ project_id: true }).extend(
- HogFunctionsInvocationsCreateBody.shape
-)
+const CdpFunctionsInvocationsCreateSchema = () => {
+ const HogFunctionsInvocationsCreateBody = orvalSchemas.HogFunctionsInvocationsCreateBody()
+ const HogFunctionsInvocationsCreateParams = orvalSchemas.HogFunctionsInvocationsCreateParams()
+ return HogFunctionsInvocationsCreateParams.omit({ project_id: true }).extend(
+ HogFunctionsInvocationsCreateBody.shape
+ )
+}
const cdpFunctionsInvocationsCreate = (): ToolBase<
- typeof CdpFunctionsInvocationsCreateSchema,
+ ReturnType<typeof CdpFunctionsInvocationsCreateSchema>,
Schemas.HogFunctionInvocation
> => ({
name: 'cdp-functions-invocations-create',
- schema: CdpFunctionsInvocationsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof CdpFunctionsInvocationsCreateSchema>) => {
+ schema: CdpFunctionsInvocationsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CdpFunctionsInvocationsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.configuration !== undefined) {
@@ -185,15 +187,18 @@ const cdpFunctionsInvocationsCreate = (): ToolBase<
},
})
-const CdpFunctionsListSchema = HogFunctionsListQueryParams
+const CdpFunctionsListSchema = () => {
+ const HogFunctionsListQueryParams = orvalSchemas.HogFunctionsListQueryParams()
+ return HogFunctionsListQueryParams
+}
const cdpFunctionsList = (): ToolBase<
- typeof CdpFunctionsListSchema,
+ ReturnType<typeof CdpFunctionsListSchema>,
WithPostHogUrl<Schemas.PaginatedHogFunctionMinimalList>
> => ({
name: 'cdp-functions-list',
- schema: CdpFunctionsListSchema,
- handler: async (context: Context, params: z.infer<typeof CdpFunctionsListSchema>) => {
+ schema: CdpFunctionsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CdpFunctionsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedHogFunctionMinimalList>({
method: 'GET',
@@ -233,17 +238,19 @@ const cdpFunctionsList = (): ToolBase<
},
})
-const CdpFunctionsListRevisionsSchema = HogFunctionsRevisionsListParams.omit({ project_id: true }).extend(
- HogFunctionsRevisionsListQueryParams.shape
-)
+const CdpFunctionsListRevisionsSchema = () => {
+ const HogFunctionsRevisionsListParams = orvalSchemas.HogFunctionsRevisionsListParams()
+ const HogFunctionsRevisionsListQueryParams = orvalSchemas.HogFunctionsRevisionsListQueryParams()
+ return HogFunctionsRevisionsListParams.omit({ project_id: true }).extend(HogFunctionsRevisionsListQueryParams.shape)
+}
const cdpFunctionsListRevisions = (): ToolBase<
- typeof CdpFunctionsListRevisionsSchema,
+ ReturnType<typeof CdpFunctionsListRevisionsSchema>,
WithPostHogUrl<Schemas.PaginatedHogFunctionRevisionBasicList>
> => ({
name: 'cdp-functions-list-revisions',
- schema: CdpFunctionsListRevisionsSchema,
- handler: async (context: Context, params: z.infer<typeof CdpFunctionsListRevisionsSchema>) => {
+ schema: CdpFunctionsListRevisionsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CdpFunctionsListRevisionsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedHogFunctionRevisionBasicList>({
method: 'GET',
@@ -257,14 +264,16 @@ const cdpFunctionsListRevisions = (): ToolBase<
},
})
-const CdpFunctionsLogsRetrieveSchema = HogFunctionsLogsRetrieveParams.omit({ project_id: true }).extend(
- HogFunctionsLogsRetrieveQueryParams.shape
-)
+const CdpFunctionsLogsRetrieveSchema = () => {
+ const HogFunctionsLogsRetrieveParams = orvalSchemas.HogFunctionsLogsRetrieveParams()
+ const HogFunctionsLogsRetrieveQueryParams = orvalSchemas.HogFunctionsLogsRetrieveQueryParams()
+ return HogFunctionsLogsRetrieveParams.omit({ project_id: true }).extend(HogFunctionsLogsRetrieveQueryParams.shape)
+}
-const cdpFunctionsLogsRetrieve = (): ToolBase<typeof CdpFunctionsLogsRetrieveSchema, unknown> => ({
+const cdpFunctionsLogsRetrieve = (): ToolBase<ReturnType<typeof CdpFunctionsLogsRetrieveSchema>, unknown> => ({
name: 'cdp-functions-logs-retrieve',
- schema: CdpFunctionsLogsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof CdpFunctionsLogsRetrieveSchema>) => {
+ schema: CdpFunctionsLogsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CdpFunctionsLogsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'GET',
@@ -282,17 +291,21 @@ const cdpFunctionsLogsRetrieve = (): ToolBase<typeof CdpFunctionsLogsRetrieveSch
},
})
-const CdpFunctionsMetricsRetrieveSchema = HogFunctionsMetricsRetrieveParams.omit({ project_id: true }).extend(
- HogFunctionsMetricsRetrieveQueryParams.shape
-)
+const CdpFunctionsMetricsRetrieveSchema = () => {
+ const HogFunctionsMetricsRetrieveParams = orvalSchemas.HogFunctionsMetricsRetrieveParams()
+ const HogFunctionsMetricsRetrieveQueryParams = orvalSchemas.HogFunctionsMetricsRetrieveQueryParams()
+ return HogFunctionsMetricsRetrieveParams.omit({ project_id: true }).extend(
+ HogFunctionsMetricsRetrieveQueryParams.shape
+ )
+}
const cdpFunctionsMetricsRetrieve = (): ToolBase<
- typeof CdpFunctionsMetricsRetrieveSchema,
+ ReturnType<typeof CdpFunctionsMetricsRetrieveSchema>,
Schemas.AppMetricsResponse
> => ({
name: 'cdp-functions-metrics-retrieve',
- schema: CdpFunctionsMetricsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof CdpFunctionsMetricsRetrieveSchema>) => {
+ schema: CdpFunctionsMetricsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CdpFunctionsMetricsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.AppMetricsResponse>({
method: 'GET',
@@ -311,18 +324,25 @@ const cdpFunctionsMetricsRetrieve = (): ToolBase<
},
})
-const CdpFunctionsPartialUpdateSchema = HogFunctionsPartialUpdateParams.omit({ project_id: true })
- .extend(HogFunctionsPartialUpdateBody.shape)
- .extend({
- enabled: HogFunctionsPartialUpdateBody.shape['enabled'].describe(
- 'Set to true to activate or false to deactivate the function.'
- ),
- })
+const CdpFunctionsPartialUpdateSchema = () => {
+ const HogFunctionsPartialUpdateBody = orvalSchemas.HogFunctionsPartialUpdateBody()
+ const HogFunctionsPartialUpdateParams = orvalSchemas.HogFunctionsPartialUpdateParams()
+ return HogFunctionsPartialUpdateParams.omit({ project_id: true })
+ .extend(HogFunctionsPartialUpdateBody.shape)
+ .extend({
+ enabled: HogFunctionsPartialUpdateBody.shape['enabled'].describe(
+ 'Set to true to activate or false to deactivate the function.'
+ ),
+ })
+}
-const cdpFunctionsPartialUpdate = (): ToolBase<typeof CdpFunctionsPartialUpdateSchema, Schemas.HogFunction> => ({
+const cdpFunctionsPartialUpdate = (): ToolBase<
+ ReturnType<typeof CdpFunctionsPartialUpdateSchema>,
+ Schemas.HogFunction
+> => ({
name: 'cdp-functions-partial-update',
- schema: CdpFunctionsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof CdpFunctionsPartialUpdateSchema>) => {
+ schema: CdpFunctionsPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CdpFunctionsPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.type !== undefined) {
@@ -377,14 +397,19 @@ const cdpFunctionsPartialUpdate = (): ToolBase<typeof CdpFunctionsPartialUpdateS
},
})
-const CdpFunctionsPublishSchema = HogFunctionsPublishCreateParams.omit({ project_id: true }).extend(
- HogFunctionsPublishCreateBody.shape
-)
+const CdpFunctionsPublishSchema = () => {
+ const HogFunctionsPublishCreateBody = orvalSchemas.HogFunctionsPublishCreateBody()
+ const HogFunctionsPublishCreateParams = orvalSchemas.HogFunctionsPublishCreateParams()
+ return HogFunctionsPublishCreateParams.omit({ project_id: true }).extend(HogFunctionsPublishCreateBody.shape)
+}
-const cdpFunctionsPublish = (): ToolBase<typeof CdpFunctionsPublishSchema, Schemas.HogFunctionPublishResponse> => ({
+const cdpFunctionsPublish = (): ToolBase<
+ ReturnType<typeof CdpFunctionsPublishSchema>,
+ Schemas.HogFunctionPublishResponse
+> => ({
name: 'cdp-functions-publish',
- schema: CdpFunctionsPublishSchema,
- handler: async (context: Context, params: z.infer<typeof CdpFunctionsPublishSchema>) => {
+ schema: CdpFunctionsPublishSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CdpFunctionsPublishSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.confirm !== undefined) {
@@ -402,15 +427,18 @@ const cdpFunctionsPublish = (): ToolBase<typeof CdpFunctionsPublishSchema, Schem
},
})
-const CdpFunctionsRearrangePartialUpdateSchema = HogFunctionsRearrangePartialUpdateBody
+const CdpFunctionsRearrangePartialUpdateSchema = () => {
+ const HogFunctionsRearrangePartialUpdateBody = orvalSchemas.HogFunctionsRearrangePartialUpdateBody()
+ return HogFunctionsRearrangePartialUpdateBody
+}
const cdpFunctionsRearrangePartialUpdate = (): ToolBase<
- typeof CdpFunctionsRearrangePartialUpdateSchema,
+ ReturnType<typeof CdpFunctionsRearrangePartialUpdateSchema>,
Schemas.HogFunction[]
> => ({
name: 'cdp-functions-rearrange-partial-update',
- schema: CdpFunctionsRearrangePartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof CdpFunctionsRearrangePartialUpdateSchema>) => {
+ schema: CdpFunctionsRearrangePartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CdpFunctionsRearrangePartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.orders !== undefined) {
@@ -425,14 +453,21 @@ const cdpFunctionsRearrangePartialUpdate = (): ToolBase<
},
})
-const CdpFunctionsRestoreRevisionSchema = HogFunctionsRevisionsRestoreCreateParams.omit({ project_id: true }).extend(
- HogFunctionsRevisionsRestoreCreateBody.shape
-)
+const CdpFunctionsRestoreRevisionSchema = () => {
+ const HogFunctionsRevisionsRestoreCreateBody = orvalSchemas.HogFunctionsRevisionsRestoreCreateBody()
+ const HogFunctionsRevisionsRestoreCreateParams = orvalSchemas.HogFunctionsRevisionsRestoreCreateParams()
+ return HogFunctionsRevisionsRestoreCreateParams.omit({ project_id: true }).extend(
+ HogFunctionsRevisionsRestoreCreateBody.shape
+ )
+}
-const cdpFunctionsRestoreRevision = (): ToolBase<typeof CdpFunctionsRestoreRevisionSchema, Schemas.HogFunction> => ({
+const cdpFunctionsRestoreRevision = (): ToolBase<
+ ReturnType<typeof CdpFunctionsRestoreRevisionSchema>,
+ Schemas.HogFunction
+> => ({
name: 'cdp-functions-restore-revision',
- schema: CdpFunctionsRestoreRevisionSchema,
- handler: async (context: Context, params: z.infer<typeof CdpFunctionsRestoreRevisionSchema>) => {
+ schema: CdpFunctionsRestoreRevisionSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CdpFunctionsRestoreRevisionSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.overwrite !== undefined) {
@@ -447,12 +482,15 @@ const cdpFunctionsRestoreRevision = (): ToolBase<typeof CdpFunctionsRestoreRevis
},
})
-const CdpFunctionsRetrieveSchema = HogFunctionsRetrieveParams.omit({ project_id: true })
+const CdpFunctionsRetrieveSchema = () => {
+ const HogFunctionsRetrieveParams = orvalSchemas.HogFunctionsRetrieveParams()
+ return HogFunctionsRetrieveParams.omit({ project_id: true })
+}
-const cdpFunctionsRetrieve = (): ToolBase<typeof CdpFunctionsRetrieveSchema, Schemas.HogFunction> => ({
+const cdpFunctionsRetrieve = (): ToolBase<ReturnType<typeof CdpFunctionsRetrieveSchema>, Schemas.HogFunction> => ({
name: 'cdp-functions-retrieve',
- schema: CdpFunctionsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof CdpFunctionsRetrieveSchema>) => {
+ schema: CdpFunctionsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CdpFunctionsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.HogFunction>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/cohorts.ts b/services/mcp/src/tools/generated/cohorts.ts
index b5142fad8aba..f7b2806c372e 100644
--- a/services/mcp/src/tools/generated/cohorts.ts
+++ b/services/mcp/src/tools/generated/cohorts.ts
@@ -2,33 +2,32 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- CohortsAddPersonsToStaticCohortPartialUpdateBody,
- CohortsAddPersonsToStaticCohortPartialUpdateParams,
- CohortsCreateBody,
- CohortsListQueryParams,
- CohortsPartialUpdateBody,
- CohortsPartialUpdateParams,
- CohortsRemovePersonFromStaticCohortPartialUpdateBody,
- CohortsRemovePersonFromStaticCohortPartialUpdateParams,
- CohortsRetrieveParams,
-} from '@/generated/cohorts/api'
+import * as orvalSchemas from '@/generated/cohorts/api'
import { withUiApp } from '@/resources/ui-apps'
import { castStringToInt } from '@/tools/cast-helpers'
import { withPostHogUrl, pickResponseFields, omitResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const CohortsAddPersonsToStaticCohortPartialUpdateSchema = CohortsAddPersonsToStaticCohortPartialUpdateParams.omit({
- project_id: true,
-}).extend(CohortsAddPersonsToStaticCohortPartialUpdateBody.shape)
+const CohortsAddPersonsToStaticCohortPartialUpdateSchema = () => {
+ const CohortsAddPersonsToStaticCohortPartialUpdateBody =
+ orvalSchemas.CohortsAddPersonsToStaticCohortPartialUpdateBody()
+ const CohortsAddPersonsToStaticCohortPartialUpdateParams =
+ orvalSchemas.CohortsAddPersonsToStaticCohortPartialUpdateParams()
+ return CohortsAddPersonsToStaticCohortPartialUpdateParams.omit({ project_id: true }).extend(
+ CohortsAddPersonsToStaticCohortPartialUpdateBody.shape
+ )
+}
const cohortsAddPersonsToStaticCohortPartialUpdate = (): ToolBase<
- typeof CohortsAddPersonsToStaticCohortPartialUpdateSchema,
+ ReturnType<typeof CohortsAddPersonsToStaticCohortPartialUpdateSchema>,
unknown
> => ({
name: 'cohorts-add-persons-to-static-cohort-partial-update',
- schema: CohortsAddPersonsToStaticCohortPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof CohortsAddPersonsToStaticCohortPartialUpdateSchema>) => {
+ schema: CohortsAddPersonsToStaticCohortPartialUpdateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof CohortsAddPersonsToStaticCohortPartialUpdateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.person_ids !== undefined) {
@@ -43,13 +42,16 @@ const cohortsAddPersonsToStaticCohortPartialUpdate = (): ToolBase<
},
})
-const CohortsCreateSchema = CohortsCreateBody.omit({ _create_in_folder: true, _create_static_person_ids: true })
+const CohortsCreateSchema = () => {
+ const CohortsCreateBody = orvalSchemas.CohortsCreateBody()
+ return CohortsCreateBody.omit({ _create_in_folder: true, _create_static_person_ids: true })
+}
-const cohortsCreate = (): ToolBase<typeof CohortsCreateSchema, WithPostHogUrl<Schemas.Cohort>> =>
+const cohortsCreate = (): ToolBase<ReturnType<typeof CohortsCreateSchema>, WithPostHogUrl<Schemas.Cohort>> =>
withUiApp('cohort', {
name: 'cohorts-create',
- schema: CohortsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof CohortsCreateSchema>) => {
+ schema: CohortsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CohortsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -79,22 +81,25 @@ const cohortsCreate = (): ToolBase<typeof CohortsCreateSchema, WithPostHogUrl<Sc
},
})
-const CohortsListSchema = CohortsListQueryParams.extend({
- limit: z.preprocess(castStringToInt, CohortsListQueryParams.shape['limit']).optional(),
- offset: z.preprocess(castStringToInt, CohortsListQueryParams.shape['offset']).optional(),
- search: CohortsListQueryParams.shape['search'].describe(
- 'Find cohorts by name. Fuzzy trigram match (tolerates typos and partial words), exact matches ordered first.'
- ),
- hide_behavioral_cohorts: CohortsListQueryParams.shape['hide_behavioral_cohorts'].describe(
- 'Set true to exclude behavioral (event-based) cohorts — not usable in batch workflow audiences.'
- ),
-})
+const CohortsListSchema = () => {
+ const CohortsListQueryParams = orvalSchemas.CohortsListQueryParams()
+ return CohortsListQueryParams.extend({
+ limit: z.preprocess(castStringToInt, CohortsListQueryParams.shape['limit']).optional(),
+ offset: z.preprocess(castStringToInt, CohortsListQueryParams.shape['offset']).optional(),
+ search: CohortsListQueryParams.shape['search'].describe(
+ 'Find cohorts by name. Fuzzy trigram match (tolerates typos and partial words), exact matches ordered first.'
+ ),
+ hide_behavioral_cohorts: CohortsListQueryParams.shape['hide_behavioral_cohorts'].describe(
+ 'Set true to exclude behavioral (event-based) cohorts — not usable in batch workflow audiences.'
+ ),
+ })
+}
-const cohortsList = (): ToolBase<typeof CohortsListSchema, WithPostHogUrl<Schemas.PaginatedCohortList>> =>
+const cohortsList = (): ToolBase<ReturnType<typeof CohortsListSchema>, WithPostHogUrl<Schemas.PaginatedCohortList>> =>
withUiApp('cohort-list', {
name: 'cohorts-list',
- schema: CohortsListSchema,
- handler: async (context: Context, params: z.infer<typeof CohortsListSchema>) => {
+ schema: CohortsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CohortsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedCohortList>({
method: 'GET',
@@ -126,15 +131,22 @@ const cohortsList = (): ToolBase<typeof CohortsListSchema, WithPostHogUrl<Schema
},
})
-const CohortsPartialUpdateSchema = CohortsPartialUpdateParams.omit({ project_id: true })
- .extend(CohortsPartialUpdateBody.omit({ _create_in_folder: true, _create_static_person_ids: true }).shape)
- .extend({ id: z.preprocess(castStringToInt, CohortsPartialUpdateParams.shape['id']) })
+const CohortsPartialUpdateSchema = () => {
+ const CohortsPartialUpdateBody = orvalSchemas.CohortsPartialUpdateBody()
+ const CohortsPartialUpdateParams = orvalSchemas.CohortsPartialUpdateParams()
+ return CohortsPartialUpdateParams.omit({ project_id: true })
+ .extend(CohortsPartialUpdateBody.omit({ _create_in_folder: true, _create_static_person_ids: true }).shape)
+ .extend({ id: z.preprocess(castStringToInt, CohortsPartialUpdateParams.shape['id']) })
+}
-const cohortsPartialUpdate = (): ToolBase<typeof CohortsPartialUpdateSchema, WithPostHogUrl<Schemas.Cohort>> =>
+const cohortsPartialUpdate = (): ToolBase<
+ ReturnType<typeof CohortsPartialUpdateSchema>,
+ WithPostHogUrl<Schemas.Cohort>
+> =>
withUiApp('cohort', {
name: 'cohorts-partial-update',
- schema: CohortsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof CohortsPartialUpdateSchema>) => {
+ schema: CohortsPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CohortsPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -167,15 +179,18 @@ const cohortsPartialUpdate = (): ToolBase<typeof CohortsPartialUpdateSchema, Wit
},
})
-const CohortsRetrieveSchema = CohortsRetrieveParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, CohortsRetrieveParams.shape['id']),
-})
+const CohortsRetrieveSchema = () => {
+ const CohortsRetrieveParams = orvalSchemas.CohortsRetrieveParams()
+ return CohortsRetrieveParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, CohortsRetrieveParams.shape['id']),
+ })
+}
-const cohortsRetrieve = (): ToolBase<typeof CohortsRetrieveSchema, WithPostHogUrl<Schemas.Cohort>> =>
+const cohortsRetrieve = (): ToolBase<ReturnType<typeof CohortsRetrieveSchema>, WithPostHogUrl<Schemas.Cohort>> =>
withUiApp('cohort', {
name: 'cohorts-retrieve',
- schema: CohortsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof CohortsRetrieveSchema>) => {
+ schema: CohortsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CohortsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Cohort>({
method: 'GET',
@@ -193,17 +208,26 @@ const cohortsRetrieve = (): ToolBase<typeof CohortsRetrieveSchema, WithPostHogUr
},
})
-const CohortsRmPersonFromStaticCohortPartialUpdateSchema = CohortsRemovePersonFromStaticCohortPartialUpdateParams.omit({
- project_id: true,
-}).extend(CohortsRemovePersonFromStaticCohortPartialUpdateBody.shape)
+const CohortsRmPersonFromStaticCohortPartialUpdateSchema = () => {
+ const CohortsRemovePersonFromStaticCohortPartialUpdateBody =
+ orvalSchemas.CohortsRemovePersonFromStaticCohortPartialUpdateBody()
+ const CohortsRemovePersonFromStaticCohortPartialUpdateParams =
+ orvalSchemas.CohortsRemovePersonFromStaticCohortPartialUpdateParams()
+ return CohortsRemovePersonFromStaticCohortPartialUpdateParams.omit({ project_id: true }).extend(
+ CohortsRemovePersonFromStaticCohortPartialUpdateBody.shape
+ )
+}
const cohortsRmPersonFromStaticCohortPartialUpdate = (): ToolBase<
- typeof CohortsRmPersonFromStaticCohortPartialUpdateSchema,
+ ReturnType<typeof CohortsRmPersonFromStaticCohortPartialUpdateSchema>,
unknown
> => ({
name: 'cohorts-rm-person-from-static-cohort-partial-update',
- schema: CohortsRmPersonFromStaticCohortPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof CohortsRmPersonFromStaticCohortPartialUpdateSchema>) => {
+ schema: CohortsRmPersonFromStaticCohortPartialUpdateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof CohortsRmPersonFromStaticCohortPartialUpdateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.person_id !== undefined) {
diff --git a/services/mcp/src/tools/generated/context_layer.ts b/services/mcp/src/tools/generated/context_layer.ts
index 00cca66af72b..6db6dfb0cdfb 100644
--- a/services/mcp/src/tools/generated/context_layer.ts
+++ b/services/mcp/src/tools/generated/context_layer.ts
@@ -2,19 +2,21 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- ContextLayerAgentChannelPagesRetrieveParams,
- ContextLayerAgentPagesRetrieveQueryParams,
- ContextLayerAgentPagesUpdateBody,
-} from '@/generated/context_layer/api'
+import * as orvalSchemas from '@/generated/context_layer/api'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const ContextWikiChannelResolveSchema = ContextLayerAgentChannelPagesRetrieveParams.omit({ project_id: true })
+const ContextWikiChannelResolveSchema = () => {
+ const ContextLayerAgentChannelPagesRetrieveParams = orvalSchemas.ContextLayerAgentChannelPagesRetrieveParams()
+ return ContextLayerAgentChannelPagesRetrieveParams.omit({ project_id: true })
+}
-const contextWikiChannelResolve = (): ToolBase<typeof ContextWikiChannelResolveSchema, Schemas.ChannelWikiPage> => ({
+const contextWikiChannelResolve = (): ToolBase<
+ ReturnType<typeof ContextWikiChannelResolveSchema>,
+ Schemas.ChannelWikiPage
+> => ({
name: 'context-wiki-channel-resolve',
- schema: ContextWikiChannelResolveSchema,
- handler: async (context: Context, params: z.infer<typeof ContextWikiChannelResolveSchema>) => {
+ schema: ContextWikiChannelResolveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ContextWikiChannelResolveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ChannelWikiPage>({
method: 'GET',
@@ -24,12 +26,15 @@ const contextWikiChannelResolve = (): ToolBase<typeof ContextWikiChannelResolveS
},
})
-const ContextWikiPageRetrieveSchema = ContextLayerAgentPagesRetrieveQueryParams
+const ContextWikiPageRetrieveSchema = () => {
+ const ContextLayerAgentPagesRetrieveQueryParams = orvalSchemas.ContextLayerAgentPagesRetrieveQueryParams()
+ return ContextLayerAgentPagesRetrieveQueryParams
+}
-const contextWikiPageRetrieve = (): ToolBase<typeof ContextWikiPageRetrieveSchema, Schemas.WikiPage> => ({
+const contextWikiPageRetrieve = (): ToolBase<ReturnType<typeof ContextWikiPageRetrieveSchema>, Schemas.WikiPage> => ({
name: 'context-wiki-page-retrieve',
- schema: ContextWikiPageRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ContextWikiPageRetrieveSchema>) => {
+ schema: ContextWikiPageRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ContextWikiPageRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.WikiPage>({
method: 'GET',
@@ -42,12 +47,18 @@ const contextWikiPageRetrieve = (): ToolBase<typeof ContextWikiPageRetrieveSchem
},
})
-const ContextWikiPageUpdateSchema = ContextLayerAgentPagesUpdateBody
+const ContextWikiPageUpdateSchema = () => {
+ const ContextLayerAgentPagesUpdateBody = orvalSchemas.ContextLayerAgentPagesUpdateBody()
+ return ContextLayerAgentPagesUpdateBody
+}
-const contextWikiPageUpdate = (): ToolBase<typeof ContextWikiPageUpdateSchema, Schemas.ContextLayerStatus> => ({
+const contextWikiPageUpdate = (): ToolBase<
+ ReturnType<typeof ContextWikiPageUpdateSchema>,
+ Schemas.ContextLayerStatus
+> => ({
name: 'context-wiki-page-update',
- schema: ContextWikiPageUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ContextWikiPageUpdateSchema>) => {
+ schema: ContextWikiPageUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ContextWikiPageUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.path !== undefined) {
@@ -68,15 +79,18 @@ const contextWikiPageUpdate = (): ToolBase<typeof ContextWikiPageUpdateSchema, S
},
})
-const LoopContextWikiChannelResolveSchema = ContextLayerAgentChannelPagesRetrieveParams.omit({ project_id: true })
+const LoopContextWikiChannelResolveSchema = () => {
+ const ContextLayerAgentChannelPagesRetrieveParams = orvalSchemas.ContextLayerAgentChannelPagesRetrieveParams()
+ return ContextLayerAgentChannelPagesRetrieveParams.omit({ project_id: true })
+}
const loopContextWikiChannelResolve = (): ToolBase<
- typeof LoopContextWikiChannelResolveSchema,
+ ReturnType<typeof LoopContextWikiChannelResolveSchema>,
Schemas.ChannelWikiPage
> => ({
name: 'loop-context-wiki-channel-resolve',
- schema: LoopContextWikiChannelResolveSchema,
- handler: async (context: Context, params: z.infer<typeof LoopContextWikiChannelResolveSchema>) => {
+ schema: LoopContextWikiChannelResolveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LoopContextWikiChannelResolveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ChannelWikiPage>({
method: 'GET',
@@ -86,12 +100,18 @@ const loopContextWikiChannelResolve = (): ToolBase<
},
})
-const LoopContextWikiPageRetrieveSchema = ContextLayerAgentPagesRetrieveQueryParams
+const LoopContextWikiPageRetrieveSchema = () => {
+ const ContextLayerAgentPagesRetrieveQueryParams = orvalSchemas.ContextLayerAgentPagesRetrieveQueryParams()
+ return ContextLayerAgentPagesRetrieveQueryParams
+}
-const loopContextWikiPageRetrieve = (): ToolBase<typeof LoopContextWikiPageRetrieveSchema, Schemas.WikiPage> => ({
+const loopContextWikiPageRetrieve = (): ToolBase<
+ ReturnType<typeof LoopContextWikiPageRetrieveSchema>,
+ Schemas.WikiPage
+> => ({
name: 'loop-context-wiki-page-retrieve',
- schema: LoopContextWikiPageRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof LoopContextWikiPageRetrieveSchema>) => {
+ schema: LoopContextWikiPageRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LoopContextWikiPageRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.WikiPage>({
method: 'GET',
@@ -104,12 +124,18 @@ const loopContextWikiPageRetrieve = (): ToolBase<typeof LoopContextWikiPageRetri
},
})
-const LoopContextWikiPageUpdateSchema = ContextLayerAgentPagesUpdateBody
+const LoopContextWikiPageUpdateSchema = () => {
+ const ContextLayerAgentPagesUpdateBody = orvalSchemas.ContextLayerAgentPagesUpdateBody()
+ return ContextLayerAgentPagesUpdateBody
+}
-const loopContextWikiPageUpdate = (): ToolBase<typeof LoopContextWikiPageUpdateSchema, Schemas.ContextLayerStatus> => ({
+const loopContextWikiPageUpdate = (): ToolBase<
+ ReturnType<typeof LoopContextWikiPageUpdateSchema>,
+ Schemas.ContextLayerStatus
+> => ({
name: 'loop-context-wiki-page-update',
- schema: LoopContextWikiPageUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof LoopContextWikiPageUpdateSchema>) => {
+ schema: LoopContextWikiPageUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LoopContextWikiPageUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.path !== undefined) {
diff --git a/services/mcp/src/tools/generated/conversations.ts b/services/mcp/src/tools/generated/conversations.ts
index 72f9f6bb4ffc..6ca20f6f5649 100644
--- a/services/mcp/src/tools/generated/conversations.ts
+++ b/services/mcp/src/tools/generated/conversations.ts
@@ -2,20 +2,7 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- ConversationsTicketsListQueryParams,
- ConversationsTicketsMessagesListParams,
- ConversationsTicketsMessagesListQueryParams,
- ConversationsTicketsNotesDestroyParams,
- ConversationsTicketsNotesPartialUpdateBody,
- ConversationsTicketsNotesPartialUpdateParams,
- ConversationsTicketsPartialUpdateBody,
- ConversationsTicketsPartialUpdateParams,
- ConversationsTicketsReplyCreateBody,
- ConversationsTicketsReplyCreateParams,
- ConversationsTicketsRetrieveParams,
- ConversationsViewsListQueryParams,
-} from '@/generated/conversations/api'
+import * as orvalSchemas from '@/generated/conversations/api'
import {
withPostHogUrl,
withAgentNote,
@@ -25,15 +12,18 @@ import {
} from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const ConversationsTicketsListSchema = ConversationsTicketsListQueryParams
+const ConversationsTicketsListSchema = () => {
+ const ConversationsTicketsListQueryParams = orvalSchemas.ConversationsTicketsListQueryParams()
+ return ConversationsTicketsListQueryParams
+}
const conversationsTicketsList = (): ToolBase<
- typeof ConversationsTicketsListSchema,
+ ReturnType<typeof ConversationsTicketsListSchema>,
WithPostHogUrl<Schemas.PaginatedTicketList>
> => ({
name: 'conversations-tickets-list',
- schema: ConversationsTicketsListSchema,
- handler: async (context: Context, params: z.infer<typeof ConversationsTicketsListSchema>) => {
+ schema: ConversationsTicketsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ConversationsTicketsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedTicketList>({
method: 'GET',
@@ -83,17 +73,24 @@ const conversationsTicketsList = (): ToolBase<
},
})
-const ConversationsTicketsMessagesRetrieveSchema = ConversationsTicketsMessagesListParams.omit({
- project_id: true,
-}).extend(ConversationsTicketsMessagesListQueryParams.shape)
+const ConversationsTicketsMessagesRetrieveSchema = () => {
+ const ConversationsTicketsMessagesListParams = orvalSchemas.ConversationsTicketsMessagesListParams()
+ const ConversationsTicketsMessagesListQueryParams = orvalSchemas.ConversationsTicketsMessagesListQueryParams()
+ return ConversationsTicketsMessagesListParams.omit({ project_id: true }).extend(
+ ConversationsTicketsMessagesListQueryParams.shape
+ )
+}
const conversationsTicketsMessagesRetrieve = (): ToolBase<
- typeof ConversationsTicketsMessagesRetrieveSchema,
+ ReturnType<typeof ConversationsTicketsMessagesRetrieveSchema>,
Schemas.PaginatedTicketMessageList
> => ({
name: 'conversations-tickets-messages-retrieve',
- schema: ConversationsTicketsMessagesRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ConversationsTicketsMessagesRetrieveSchema>) => {
+ schema: ConversationsTicketsMessagesRetrieveSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ConversationsTicketsMessagesRetrieveSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedTicketMessageList>({
method: 'GET',
@@ -107,12 +104,18 @@ const conversationsTicketsMessagesRetrieve = (): ToolBase<
},
})
-const ConversationsTicketsNotesDestroySchema = ConversationsTicketsNotesDestroyParams.omit({ project_id: true })
+const ConversationsTicketsNotesDestroySchema = () => {
+ const ConversationsTicketsNotesDestroyParams = orvalSchemas.ConversationsTicketsNotesDestroyParams()
+ return ConversationsTicketsNotesDestroyParams.omit({ project_id: true })
+}
-const conversationsTicketsNotesDestroy = (): ToolBase<typeof ConversationsTicketsNotesDestroySchema, unknown> => ({
+const conversationsTicketsNotesDestroy = (): ToolBase<
+ ReturnType<typeof ConversationsTicketsNotesDestroySchema>,
+ unknown
+> => ({
name: 'conversations-tickets-notes-destroy',
- schema: ConversationsTicketsNotesDestroySchema,
- handler: async (context: Context, params: z.infer<typeof ConversationsTicketsNotesDestroySchema>) => {
+ schema: ConversationsTicketsNotesDestroySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ConversationsTicketsNotesDestroySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -122,17 +125,24 @@ const conversationsTicketsNotesDestroy = (): ToolBase<typeof ConversationsTicket
},
})
-const ConversationsTicketsNotesPartialUpdateSchema = ConversationsTicketsNotesPartialUpdateParams.omit({
- project_id: true,
-}).extend(ConversationsTicketsNotesPartialUpdateBody.shape)
+const ConversationsTicketsNotesPartialUpdateSchema = () => {
+ const ConversationsTicketsNotesPartialUpdateBody = orvalSchemas.ConversationsTicketsNotesPartialUpdateBody()
+ const ConversationsTicketsNotesPartialUpdateParams = orvalSchemas.ConversationsTicketsNotesPartialUpdateParams()
+ return ConversationsTicketsNotesPartialUpdateParams.omit({ project_id: true }).extend(
+ ConversationsTicketsNotesPartialUpdateBody.shape
+ )
+}
const conversationsTicketsNotesPartialUpdate = (): ToolBase<
- typeof ConversationsTicketsNotesPartialUpdateSchema,
+ ReturnType<typeof ConversationsTicketsNotesPartialUpdateSchema>,
Schemas.TicketMessage
> => ({
name: 'conversations-tickets-notes-partial-update',
- schema: ConversationsTicketsNotesPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ConversationsTicketsNotesPartialUpdateSchema>) => {
+ schema: ConversationsTicketsNotesPartialUpdateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ConversationsTicketsNotesPartialUpdateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.message !== undefined) {
@@ -150,17 +160,21 @@ const conversationsTicketsNotesPartialUpdate = (): ToolBase<
},
})
-const ConversationsTicketsReplyCreateSchema = ConversationsTicketsReplyCreateParams.omit({ project_id: true }).extend(
- ConversationsTicketsReplyCreateBody.shape
-)
+const ConversationsTicketsReplyCreateSchema = () => {
+ const ConversationsTicketsReplyCreateBody = orvalSchemas.ConversationsTicketsReplyCreateBody()
+ const ConversationsTicketsReplyCreateParams = orvalSchemas.ConversationsTicketsReplyCreateParams()
+ return ConversationsTicketsReplyCreateParams.omit({ project_id: true }).extend(
+ ConversationsTicketsReplyCreateBody.shape
+ )
+}
const conversationsTicketsReplyCreate = (): ToolBase<
- typeof ConversationsTicketsReplyCreateSchema,
+ ReturnType<typeof ConversationsTicketsReplyCreateSchema>,
Schemas.TicketMessage
> => ({
name: 'conversations-tickets-reply-create',
- schema: ConversationsTicketsReplyCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ConversationsTicketsReplyCreateSchema>) => {
+ schema: ConversationsTicketsReplyCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ConversationsTicketsReplyCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.message !== undefined) {
@@ -181,15 +195,18 @@ const conversationsTicketsReplyCreate = (): ToolBase<
},
})
-const ConversationsTicketsRetrieveSchema = ConversationsTicketsRetrieveParams.omit({ project_id: true })
+const ConversationsTicketsRetrieveSchema = () => {
+ const ConversationsTicketsRetrieveParams = orvalSchemas.ConversationsTicketsRetrieveParams()
+ return ConversationsTicketsRetrieveParams.omit({ project_id: true })
+}
const conversationsTicketsRetrieve = (): ToolBase<
- typeof ConversationsTicketsRetrieveSchema,
+ ReturnType<typeof ConversationsTicketsRetrieveSchema>,
WithAgentNote<WithPostHogUrl<Schemas.Ticket>>
> => ({
name: 'conversations-tickets-retrieve',
- schema: ConversationsTicketsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ConversationsTicketsRetrieveSchema>) => {
+ schema: ConversationsTicketsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ConversationsTicketsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Ticket>({
method: 'GET',
@@ -226,17 +243,21 @@ const conversationsTicketsRetrieve = (): ToolBase<
},
})
-const ConversationsTicketsUpdateSchema = ConversationsTicketsPartialUpdateParams.omit({ project_id: true }).extend(
- ConversationsTicketsPartialUpdateBody.shape
-)
+const ConversationsTicketsUpdateSchema = () => {
+ const ConversationsTicketsPartialUpdateBody = orvalSchemas.ConversationsTicketsPartialUpdateBody()
+ const ConversationsTicketsPartialUpdateParams = orvalSchemas.ConversationsTicketsPartialUpdateParams()
+ return ConversationsTicketsPartialUpdateParams.omit({ project_id: true }).extend(
+ ConversationsTicketsPartialUpdateBody.shape
+ )
+}
const conversationsTicketsUpdate = (): ToolBase<
- typeof ConversationsTicketsUpdateSchema,
+ ReturnType<typeof ConversationsTicketsUpdateSchema>,
WithPostHogUrl<Schemas.Ticket>
> => ({
name: 'conversations-tickets-update',
- schema: ConversationsTicketsUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ConversationsTicketsUpdateSchema>) => {
+ schema: ConversationsTicketsUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ConversationsTicketsUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.status !== undefined) {
@@ -266,15 +287,18 @@ const conversationsTicketsUpdate = (): ToolBase<
},
})
-const ConversationsViewsListSchema = ConversationsViewsListQueryParams
+const ConversationsViewsListSchema = () => {
+ const ConversationsViewsListQueryParams = orvalSchemas.ConversationsViewsListQueryParams()
+ return ConversationsViewsListQueryParams
+}
const conversationsViewsList = (): ToolBase<
- typeof ConversationsViewsListSchema,
+ ReturnType<typeof ConversationsViewsListSchema>,
WithPostHogUrl<Schemas.PaginatedTicketViewList>
> => ({
name: 'conversations-views-list',
- schema: ConversationsViewsListSchema,
- handler: async (context: Context, params: z.infer<typeof ConversationsViewsListSchema>) => {
+ schema: ConversationsViewsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ConversationsViewsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedTicketViewList>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/core.ts b/services/mcp/src/tools/generated/core.ts
index 73fc710054de..e59857c64179 100644
--- a/services/mcp/src/tools/generated/core.ts
+++ b/services/mcp/src/tools/generated/core.ts
@@ -2,18 +2,7 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- OrganizationsProjectsPartialUpdateBody,
- OrganizationsProjectsPartialUpdateParams,
- OrganizationsProjectsRetrieveParams,
- ProductEnablementCreateBody,
- UploadedMediaCompleteUploadCreateParams,
- UploadedMediaListQueryParams,
- UploadedMediaStartUploadCreateBody,
- UsersPartialUpdateBody,
- UsersPartialUpdateParams,
- UsersRetrieveParams,
-} from '@/generated/core/api'
+import * as orvalSchemas from '@/generated/core/api'
import { castStringToInt } from '@/tools/cast-helpers'
import {
withPostHogUrl,
@@ -25,12 +14,18 @@ import {
} from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const MediaImageUploadCompleteSchema = UploadedMediaCompleteUploadCreateParams.omit({ project_id: true })
+const MediaImageUploadCompleteSchema = () => {
+ const UploadedMediaCompleteUploadCreateParams = orvalSchemas.UploadedMediaCompleteUploadCreateParams()
+ return UploadedMediaCompleteUploadCreateParams.omit({ project_id: true })
+}
-const mediaImageUploadComplete = (): ToolBase<typeof MediaImageUploadCompleteSchema, Schemas.UploadedMedia> => ({
+const mediaImageUploadComplete = (): ToolBase<
+ ReturnType<typeof MediaImageUploadCompleteSchema>,
+ Schemas.UploadedMedia
+> => ({
name: 'media-image-upload-complete',
- schema: MediaImageUploadCompleteSchema,
- handler: async (context: Context, params: z.infer<typeof MediaImageUploadCompleteSchema>) => {
+ schema: MediaImageUploadCompleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof MediaImageUploadCompleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.UploadedMedia>({
method: 'POST',
@@ -40,12 +35,18 @@ const mediaImageUploadComplete = (): ToolBase<typeof MediaImageUploadCompleteSch
},
})
-const MediaImageUploadStartSchema = UploadedMediaStartUploadCreateBody
+const MediaImageUploadStartSchema = () => {
+ const UploadedMediaStartUploadCreateBody = orvalSchemas.UploadedMediaStartUploadCreateBody()
+ return UploadedMediaStartUploadCreateBody
+}
-const mediaImageUploadStart = (): ToolBase<typeof MediaImageUploadStartSchema, Schemas.UploadedMediaUploadStarted> => ({
+const mediaImageUploadStart = (): ToolBase<
+ ReturnType<typeof MediaImageUploadStartSchema>,
+ Schemas.UploadedMediaUploadStarted
+> => ({
name: 'media-image-upload-start',
- schema: MediaImageUploadStartSchema,
- handler: async (context: Context, params: z.infer<typeof MediaImageUploadStartSchema>) => {
+ schema: MediaImageUploadStartSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof MediaImageUploadStartSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -63,17 +64,20 @@ const mediaImageUploadStart = (): ToolBase<typeof MediaImageUploadStartSchema, S
},
})
-const MediaImagesListSchema = UploadedMediaListQueryParams.extend({
- purpose: UploadedMediaListQueryParams.shape['purpose'].describe('The library to list, e.g. "email". Required.'),
-})
+const MediaImagesListSchema = () => {
+ const UploadedMediaListQueryParams = orvalSchemas.UploadedMediaListQueryParams()
+ return UploadedMediaListQueryParams.extend({
+ purpose: UploadedMediaListQueryParams.shape['purpose'].describe('The library to list, e.g. "email". Required.'),
+ })
+}
const mediaImagesList = (): ToolBase<
- typeof MediaImagesListSchema,
+ ReturnType<typeof MediaImagesListSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.PaginatedUploadedMediaList>>
> => ({
name: 'media-images-list',
- schema: MediaImagesListSchema,
- handler: async (context: Context, params: z.infer<typeof MediaImagesListSchema>) => {
+ schema: MediaImagesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof MediaImagesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedUploadedMediaList>({
method: 'GET',
@@ -92,12 +96,15 @@ const mediaImagesList = (): ToolBase<
},
})
-const ProductsEnableSchema = ProductEnablementCreateBody
+const ProductsEnableSchema = () => {
+ const ProductEnablementCreateBody = orvalSchemas.ProductEnablementCreateBody()
+ return ProductEnablementCreateBody
+}
-const productsEnable = (): ToolBase<typeof ProductsEnableSchema, Schemas.ProductEnablementResult> => ({
+const productsEnable = (): ToolBase<ReturnType<typeof ProductsEnableSchema>, Schemas.ProductEnablementResult> => ({
name: 'products-enable',
- schema: ProductsEnableSchema,
- handler: async (context: Context, params: z.infer<typeof ProductsEnableSchema>) => {
+ schema: ProductsEnableSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ProductsEnableSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.products !== undefined) {
@@ -112,21 +119,24 @@ const productsEnable = (): ToolBase<typeof ProductsEnableSchema, Schemas.Product
},
})
-const ProjectGetSchema = OrganizationsProjectsRetrieveParams.omit({ organization_id: true }).extend({
- id: z
- .preprocess(
- castStringToInt,
- OrganizationsProjectsRetrieveParams.shape['id']
- .describe("Project ID. If omitted, returns the caller's active project.")
- .optional()
- )
- .optional(),
-})
+const ProjectGetSchema = () => {
+ const OrganizationsProjectsRetrieveParams = orvalSchemas.OrganizationsProjectsRetrieveParams()
+ return OrganizationsProjectsRetrieveParams.omit({ organization_id: true }).extend({
+ id: z
+ .preprocess(
+ castStringToInt,
+ OrganizationsProjectsRetrieveParams.shape['id']
+ .describe("Project ID. If omitted, returns the caller's active project.")
+ .optional()
+ )
+ .optional(),
+ })
+}
-const projectGet = (): ToolBase<typeof ProjectGetSchema, Schemas.ProjectBackwardCompat> => ({
+const projectGet = (): ToolBase<ReturnType<typeof ProjectGetSchema>, Schemas.ProjectBackwardCompat> => ({
name: 'project-get',
- schema: ProjectGetSchema,
- handler: async (context: Context, params: z.infer<typeof ProjectGetSchema>) => {
+ schema: ProjectGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ProjectGetSchema>>) => {
const orgId = await context.stateManager.getOrgID()
const id = params.id ?? (await context.stateManager.getProjectId())
if (!id) {
@@ -146,21 +156,28 @@ const projectGet = (): ToolBase<typeof ProjectGetSchema, Schemas.ProjectBackward
},
})
-const ProjectSettingsUpdateSchema = OrganizationsProjectsPartialUpdateParams.omit({ organization_id: true })
- .extend(OrganizationsProjectsPartialUpdateBody.shape)
- .extend({
- id: z.preprocess(
- castStringToInt,
- OrganizationsProjectsPartialUpdateParams.shape['id'].describe(
- "Project ID, or `@current` to target the caller's active project."
- )
- ),
- })
+const ProjectSettingsUpdateSchema = () => {
+ const OrganizationsProjectsPartialUpdateBody = orvalSchemas.OrganizationsProjectsPartialUpdateBody()
+ const OrganizationsProjectsPartialUpdateParams = orvalSchemas.OrganizationsProjectsPartialUpdateParams()
+ return OrganizationsProjectsPartialUpdateParams.omit({ organization_id: true })
+ .extend(OrganizationsProjectsPartialUpdateBody.shape)
+ .extend({
+ id: z.preprocess(
+ castStringToInt,
+ OrganizationsProjectsPartialUpdateParams.shape['id'].describe(
+ "Project ID, or `@current` to target the caller's active project."
+ )
+ ),
+ })
+}
-const projectSettingsUpdate = (): ToolBase<typeof ProjectSettingsUpdateSchema, Schemas.ProjectBackwardCompat> => ({
+const projectSettingsUpdate = (): ToolBase<
+ ReturnType<typeof ProjectSettingsUpdateSchema>,
+ Schemas.ProjectBackwardCompat
+> => ({
name: 'project-settings-update',
- schema: ProjectSettingsUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ProjectSettingsUpdateSchema>) => {
+ schema: ProjectSettingsUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ProjectSettingsUpdateSchema>>) => {
const orgId = await context.stateManager.getOrgID()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -375,14 +392,17 @@ const projectSettingsUpdate = (): ToolBase<typeof ProjectSettingsUpdateSchema, S
},
})
-const UserGetSchema = UsersRetrieveParams.extend({
- uuid: UsersRetrieveParams.shape['uuid'].describe('User UUID, or `@me` to target the authenticated user.'),
-})
+const UserGetSchema = () => {
+ const UsersRetrieveParams = orvalSchemas.UsersRetrieveParams()
+ return UsersRetrieveParams.extend({
+ uuid: UsersRetrieveParams.shape['uuid'].describe('User UUID, or `@me` to target the authenticated user.'),
+ })
+}
-const userGet = (): ToolBase<typeof UserGetSchema, Schemas.User> => ({
+const userGet = (): ToolBase<ReturnType<typeof UserGetSchema>, Schemas.User> => ({
name: 'user-get',
- schema: UserGetSchema,
- handler: async (context: Context, params: z.infer<typeof UserGetSchema>) => {
+ schema: UserGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UserGetSchema>>) => {
const result = await context.api.request<Schemas.User>({
method: 'GET',
path: `/api/users/${encodeURIComponent(String(params.uuid))}/`,
@@ -427,14 +447,18 @@ const userGet = (): ToolBase<typeof UserGetSchema, Schemas.User> => ({
},
})
-const UserSettingsUpdateSchema = UsersPartialUpdateParams.extend(UsersPartialUpdateBody.shape).extend({
- uuid: UsersPartialUpdateParams.shape['uuid'].describe('User UUID, or `@me` to target the authenticated user.'),
-})
+const UserSettingsUpdateSchema = () => {
+ const UsersPartialUpdateBody = orvalSchemas.UsersPartialUpdateBody()
+ const UsersPartialUpdateParams = orvalSchemas.UsersPartialUpdateParams()
+ return UsersPartialUpdateParams.extend(UsersPartialUpdateBody.shape).extend({
+ uuid: UsersPartialUpdateParams.shape['uuid'].describe('User UUID, or `@me` to target the authenticated user.'),
+ })
+}
-const userSettingsUpdate = (): ToolBase<typeof UserSettingsUpdateSchema, Schemas.User> => ({
+const userSettingsUpdate = (): ToolBase<ReturnType<typeof UserSettingsUpdateSchema>, Schemas.User> => ({
name: 'user-settings-update',
- schema: UserSettingsUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof UserSettingsUpdateSchema>) => {
+ schema: UserSettingsUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UserSettingsUpdateSchema>>) => {
const body: Record<string, unknown> = {}
if (params.first_name !== undefined) {
body['first_name'] = params.first_name
diff --git a/services/mcp/src/tools/generated/customer_analytics.ts b/services/mcp/src/tools/generated/customer_analytics.ts
index 843f78e0239c..2940b89e7ed9 100644
--- a/services/mcp/src/tools/generated/customer_analytics.ts
+++ b/services/mcp/src/tools/generated/customer_analytics.ts
@@ -2,97 +2,7 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- AccountRelationshipDefinitionsCreateBody,
- AccountRelationshipDefinitionsDestroyParams,
- AccountRelationshipDefinitionsListQueryParams,
- AccountRelationshipDefinitionsPartialUpdateBody,
- AccountRelationshipDefinitionsPartialUpdateParams,
- AccountRelationshipDefinitionsRetrieveParams,
- AccountsCreateBody,
- AccountsCustomPropertyValuesCreateBody,
- AccountsCustomPropertyValuesCreateParams,
- AccountsCustomPropertyValuesListParams,
- AccountsDestroyParams,
- AccountsListQueryParams,
- AccountsMeetingsListParams,
- AccountsMeetingsListQueryParams,
- AccountsNotebooksCreateBody,
- AccountsNotebooksCreateParams,
- AccountsNotebooksDestroyParams,
- AccountsNotebooksListParams,
- AccountsNotebooksListQueryParams,
- AccountsNotebooksRetrieveParams,
- AccountsPartialUpdateBody,
- AccountsPartialUpdateParams,
- AccountsRelationshipsCreateBody,
- AccountsRelationshipsCreateParams,
- AccountsRelationshipsEndCreateParams,
- AccountsRelationshipsListParams,
- AccountsRelationshipsListQueryParams,
- AccountsRetrieveParams,
- AccountsSummariesListParams,
- AccountsSummariesListQueryParams,
- AnnouncementsCreateBody,
- AnnouncementsListQueryParams,
- AnnouncementsRetrieveParams,
- CustomPropertyDefinitionsCreateBody,
- CustomPropertyDefinitionsDestroyParams,
- CustomPropertyDefinitionsListQueryParams,
- CustomPropertyDefinitionsPartialUpdateBody,
- CustomPropertyDefinitionsPartialUpdateParams,
- CustomPropertyDefinitionsRetrieveParams,
- CustomPropertySourcesBackfillParams,
- CustomPropertySourcesCreateBody,
- CustomPropertySourcesDestroyParams,
- CustomPropertySourcesListQueryParams,
- CustomPropertySourcesPartialUpdateBody,
- CustomPropertySourcesPartialUpdateParams,
- CustomPropertySourcesRetrieveParams,
- CustomPropertySourcesRunsListParams,
- CustomPropertySourcesRunsListQueryParams,
- CustomPropertySourcesSyncParams,
- EventStreamsAddAccountCreateBody,
- EventStreamsAddAccountCreateParams,
- EventStreamsCreateBody,
- EventStreamsDestroyParams,
- EventStreamsPartialUpdateBody,
- EventStreamsPartialUpdateParams,
- EventStreamsRemoveAccountCreateBody,
- EventStreamsRemoveAccountCreateParams,
- EventStreamsSendTestMessageCreateParams,
- FeatureRequestProductAreasCreateBody,
- FeatureRequestProductAreasListQueryParams,
- FeatureRequestProductAreasPartialUpdateBody,
- FeatureRequestProductAreasPartialUpdateParams,
- FeatureRequestsAddAccountCreateBody,
- FeatureRequestsAddAccountCreateParams,
- FeatureRequestsAddEvidenceCreateBody,
- FeatureRequestsAddEvidenceCreateParams,
- FeatureRequestsArchiveCreateBody,
- FeatureRequestsArchiveCreateParams,
- FeatureRequestsCreateBody,
- FeatureRequestsHistoryListParams,
- FeatureRequestsListQueryParams,
- FeatureRequestsPartialUpdateBody,
- FeatureRequestsPartialUpdateParams,
- FeatureRequestsRemoveEvidenceCreateBody,
- FeatureRequestsRemoveEvidenceCreateParams,
- FeatureRequestsRestoreCreateBody,
- FeatureRequestsRestoreCreateParams,
- FeatureRequestsRetrieveParams,
- FeatureRequestsStatusHistoryListParams,
- FeatureRequestsUpdateEvidenceCreateBody,
- FeatureRequestsUpdateEvidenceCreateParams,
- GroupsTypesMetricsCreateBody,
- GroupsTypesMetricsCreateParams,
- GroupsTypesMetricsDestroyParams,
- GroupsTypesMetricsListParams,
- GroupsTypesMetricsListQueryParams,
- GroupsTypesMetricsPartialUpdateBody,
- GroupsTypesMetricsPartialUpdateParams,
- GroupsTypesMetricsRetrieveParams,
-} from '@/generated/customer_analytics/api'
+import * as orvalSchemas from '@/generated/customer_analytics/api'
import { UsageMetricFiltersSchema } from '@/schema/tool-inputs'
import { getConfirmedActionRuntime } from '@/tools/confirmed-action-registry'
import {
@@ -109,15 +19,21 @@ import {
} from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const AccountRelationshipDefinitionsCreateSchema = AccountRelationshipDefinitionsCreateBody
+const AccountRelationshipDefinitionsCreateSchema = () => {
+ const AccountRelationshipDefinitionsCreateBody = orvalSchemas.AccountRelationshipDefinitionsCreateBody()
+ return AccountRelationshipDefinitionsCreateBody
+}
const accountRelationshipDefinitionsCreate = (): ToolBase<
- typeof AccountRelationshipDefinitionsCreateSchema,
+ ReturnType<typeof AccountRelationshipDefinitionsCreateSchema>,
Schemas.AccountRelationshipDefinition
> => ({
name: 'account-relationship-definitions-create',
- schema: AccountRelationshipDefinitionsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof AccountRelationshipDefinitionsCreateSchema>) => {
+ schema: AccountRelationshipDefinitionsCreateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof AccountRelationshipDefinitionsCreateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -138,17 +54,21 @@ const accountRelationshipDefinitionsCreate = (): ToolBase<
},
})
-const AccountRelationshipDefinitionsDestroySchema = AccountRelationshipDefinitionsDestroyParams.omit({
- project_id: true,
-})
+const AccountRelationshipDefinitionsDestroySchema = () => {
+ const AccountRelationshipDefinitionsDestroyParams = orvalSchemas.AccountRelationshipDefinitionsDestroyParams()
+ return AccountRelationshipDefinitionsDestroyParams.omit({ project_id: true })
+}
const accountRelationshipDefinitionsDestroy = (): ToolBase<
- typeof AccountRelationshipDefinitionsDestroySchema,
+ ReturnType<typeof AccountRelationshipDefinitionsDestroySchema>,
unknown
> => ({
name: 'account-relationship-definitions-destroy',
- schema: AccountRelationshipDefinitionsDestroySchema,
- handler: async (context: Context, params: z.infer<typeof AccountRelationshipDefinitionsDestroySchema>) => {
+ schema: AccountRelationshipDefinitionsDestroySchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof AccountRelationshipDefinitionsDestroySchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -158,15 +78,18 @@ const accountRelationshipDefinitionsDestroy = (): ToolBase<
},
})
-const AccountRelationshipDefinitionsListSchema = AccountRelationshipDefinitionsListQueryParams
+const AccountRelationshipDefinitionsListSchema = () => {
+ const AccountRelationshipDefinitionsListQueryParams = orvalSchemas.AccountRelationshipDefinitionsListQueryParams()
+ return AccountRelationshipDefinitionsListQueryParams
+}
const accountRelationshipDefinitionsList = (): ToolBase<
- typeof AccountRelationshipDefinitionsListSchema,
+ ReturnType<typeof AccountRelationshipDefinitionsListSchema>,
WithPostHogUrl<Schemas.PaginatedAccountRelationshipDefinitionList>
> => ({
name: 'account-relationship-definitions-list',
- schema: AccountRelationshipDefinitionsListSchema,
- handler: async (context: Context, params: z.infer<typeof AccountRelationshipDefinitionsListSchema>) => {
+ schema: AccountRelationshipDefinitionsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AccountRelationshipDefinitionsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedAccountRelationshipDefinitionList>({
method: 'GET',
@@ -180,17 +103,26 @@ const accountRelationshipDefinitionsList = (): ToolBase<
},
})
-const AccountRelationshipDefinitionsPartialUpdateSchema = AccountRelationshipDefinitionsPartialUpdateParams.omit({
- project_id: true,
-}).extend(AccountRelationshipDefinitionsPartialUpdateBody.shape)
+const AccountRelationshipDefinitionsPartialUpdateSchema = () => {
+ const AccountRelationshipDefinitionsPartialUpdateBody =
+ orvalSchemas.AccountRelationshipDefinitionsPartialUpdateBody()
+ const AccountRelationshipDefinitionsPartialUpdateParams =
+ orvalSchemas.AccountRelationshipDefinitionsPartialUpdateParams()
+ return AccountRelationshipDefinitionsPartialUpdateParams.omit({ project_id: true }).extend(
+ AccountRelationshipDefinitionsPartialUpdateBody.shape
+ )
+}
const accountRelationshipDefinitionsPartialUpdate = (): ToolBase<
- typeof AccountRelationshipDefinitionsPartialUpdateSchema,
+ ReturnType<typeof AccountRelationshipDefinitionsPartialUpdateSchema>,
Schemas.AccountRelationshipDefinition
> => ({
name: 'account-relationship-definitions-partial-update',
- schema: AccountRelationshipDefinitionsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof AccountRelationshipDefinitionsPartialUpdateSchema>) => {
+ schema: AccountRelationshipDefinitionsPartialUpdateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof AccountRelationshipDefinitionsPartialUpdateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -211,17 +143,21 @@ const accountRelationshipDefinitionsPartialUpdate = (): ToolBase<
},
})
-const AccountRelationshipDefinitionsRetrieveSchema = AccountRelationshipDefinitionsRetrieveParams.omit({
- project_id: true,
-})
+const AccountRelationshipDefinitionsRetrieveSchema = () => {
+ const AccountRelationshipDefinitionsRetrieveParams = orvalSchemas.AccountRelationshipDefinitionsRetrieveParams()
+ return AccountRelationshipDefinitionsRetrieveParams.omit({ project_id: true })
+}
const accountRelationshipDefinitionsRetrieve = (): ToolBase<
- typeof AccountRelationshipDefinitionsRetrieveSchema,
+ ReturnType<typeof AccountRelationshipDefinitionsRetrieveSchema>,
Schemas.AccountRelationshipDefinition
> => ({
name: 'account-relationship-definitions-retrieve',
- schema: AccountRelationshipDefinitionsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof AccountRelationshipDefinitionsRetrieveSchema>) => {
+ schema: AccountRelationshipDefinitionsRetrieveSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof AccountRelationshipDefinitionsRetrieveSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.AccountRelationshipDefinition>({
method: 'GET',
@@ -231,19 +167,22 @@ const accountRelationshipDefinitionsRetrieve = (): ToolBase<
},
})
-const AccountsCreateSchema = AccountsCreateBody.extend({
- properties: AccountsCreateBody.shape['properties'].describe(
- 'Typed account properties. `stripe_customer_id`, `hubspot_deal_id`, `billing_id`, `sfdc_id`, `zendesk_id` are optional string identifiers for the account in external systems. `email_domains` (company email domains, e.g. ["acme.com"]) and `known_emails` (individual addresses, for contacts on personal domains) match synced touchpoints such as calendar meetings to this account. All fields are optional.'
- ),
- tags: AccountsCreateBody.shape['tags'].describe(
- 'Tag names to attach to the account. Tags are created on demand if they do not already exist for the team.'
- ),
-})
+const AccountsCreateSchema = () => {
+ const AccountsCreateBody = orvalSchemas.AccountsCreateBody()
+ return AccountsCreateBody.extend({
+ properties: AccountsCreateBody.shape['properties'].describe(
+ 'Typed account properties. `stripe_customer_id`, `hubspot_deal_id`, `billing_id`, `sfdc_id`, `zendesk_id` are optional string identifiers for the account in external systems. `email_domains` (company email domains, e.g. ["acme.com"]) and `known_emails` (individual addresses, for contacts on personal domains) match synced touchpoints such as calendar meetings to this account. All fields are optional.'
+ ),
+ tags: AccountsCreateBody.shape['tags'].describe(
+ 'Tag names to attach to the account. Tags are created on demand if they do not already exist for the team.'
+ ),
+ })
+}
-const accountsCreate = (): ToolBase<typeof AccountsCreateSchema, Schemas.Account> => ({
+const accountsCreate = (): ToolBase<ReturnType<typeof AccountsCreateSchema>, Schemas.Account> => ({
name: 'accounts-create',
- schema: AccountsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof AccountsCreateSchema>) => {
+ schema: AccountsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AccountsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -273,17 +212,21 @@ const accountsCreate = (): ToolBase<typeof AccountsCreateSchema, Schemas.Account
},
})
-const AccountsCustomPropertyValuesCreateSchema = AccountsCustomPropertyValuesCreateParams.omit({
- project_id: true,
-}).extend(AccountsCustomPropertyValuesCreateBody.shape)
+const AccountsCustomPropertyValuesCreateSchema = () => {
+ const AccountsCustomPropertyValuesCreateBody = orvalSchemas.AccountsCustomPropertyValuesCreateBody()
+ const AccountsCustomPropertyValuesCreateParams = orvalSchemas.AccountsCustomPropertyValuesCreateParams()
+ return AccountsCustomPropertyValuesCreateParams.omit({ project_id: true }).extend(
+ AccountsCustomPropertyValuesCreateBody.shape
+ )
+}
const accountsCustomPropertyValuesCreate = (): ToolBase<
- typeof AccountsCustomPropertyValuesCreateSchema,
+ ReturnType<typeof AccountsCustomPropertyValuesCreateSchema>,
Schemas.CustomPropertyValue
> => ({
name: 'accounts-custom-property-values-create',
- schema: AccountsCustomPropertyValuesCreateSchema,
- handler: async (context: Context, params: z.infer<typeof AccountsCustomPropertyValuesCreateSchema>) => {
+ schema: AccountsCustomPropertyValuesCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AccountsCustomPropertyValuesCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.definition !== undefined) {
@@ -301,15 +244,18 @@ const accountsCustomPropertyValuesCreate = (): ToolBase<
},
})
-const AccountsCustomPropertyValuesListSchema = AccountsCustomPropertyValuesListParams.omit({ project_id: true })
+const AccountsCustomPropertyValuesListSchema = () => {
+ const AccountsCustomPropertyValuesListParams = orvalSchemas.AccountsCustomPropertyValuesListParams()
+ return AccountsCustomPropertyValuesListParams.omit({ project_id: true })
+}
const accountsCustomPropertyValuesList = (): ToolBase<
- typeof AccountsCustomPropertyValuesListSchema,
+ ReturnType<typeof AccountsCustomPropertyValuesListSchema>,
WithPostHogUrl<Schemas.CustomPropertyValue[]>
> => ({
name: 'accounts-custom-property-values-list',
- schema: AccountsCustomPropertyValuesListSchema,
- handler: async (context: Context, params: z.infer<typeof AccountsCustomPropertyValuesListSchema>) => {
+ schema: AccountsCustomPropertyValuesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AccountsCustomPropertyValuesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.CustomPropertyValue[]>({
method: 'GET',
@@ -319,12 +265,15 @@ const accountsCustomPropertyValuesList = (): ToolBase<
},
})
-const AccountsDestroySchema = AccountsDestroyParams.omit({ project_id: true })
+const AccountsDestroySchema = () => {
+ const AccountsDestroyParams = orvalSchemas.AccountsDestroyParams()
+ return AccountsDestroyParams.omit({ project_id: true })
+}
-const accountsDestroy = (): ToolBase<typeof AccountsDestroySchema, unknown> => ({
+const accountsDestroy = (): ToolBase<ReturnType<typeof AccountsDestroySchema>, unknown> => ({
name: 'accounts-destroy',
- schema: AccountsDestroySchema,
- handler: async (context: Context, params: z.infer<typeof AccountsDestroySchema>) => {
+ schema: AccountsDestroySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AccountsDestroySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -334,22 +283,28 @@ const accountsDestroy = (): ToolBase<typeof AccountsDestroySchema, unknown> => (
},
})
-const AccountsListSchema = AccountsListQueryParams.extend({
- include_churned: AccountsListQueryParams.shape['include_churned'].describe(
- 'Include churned accounts. Churned accounts are hidden by default.'
- ),
- include_ignored: AccountsListQueryParams.shape['include_ignored'].describe(
- 'Include ignored accounts. Ignored accounts are hidden by default.'
- ),
- tags: AccountsListQueryParams.shape['tags'].describe(
- 'JSON-encoded array of tag names to filter by, e.g. `["enterprise","priority"]`. Returns accounts that have any of the listed tags.'
- ),
-})
+const AccountsListSchema = () => {
+ const AccountsListQueryParams = orvalSchemas.AccountsListQueryParams()
+ return AccountsListQueryParams.extend({
+ include_churned: AccountsListQueryParams.shape['include_churned'].describe(
+ 'Include churned accounts. Churned accounts are hidden by default.'
+ ),
+ include_ignored: AccountsListQueryParams.shape['include_ignored'].describe(
+ 'Include ignored accounts. Ignored accounts are hidden by default.'
+ ),
+ tags: AccountsListQueryParams.shape['tags'].describe(
+ 'JSON-encoded array of tag names to filter by, e.g. `["enterprise","priority"]`. Returns accounts that have any of the listed tags.'
+ ),
+ })
+}
-const accountsList = (): ToolBase<typeof AccountsListSchema, WithPostHogUrl<Schemas.PaginatedAccountList>> => ({
+const accountsList = (): ToolBase<
+ ReturnType<typeof AccountsListSchema>,
+ WithPostHogUrl<Schemas.PaginatedAccountList>
+> => ({
name: 'accounts-list',
- schema: AccountsListSchema,
- handler: async (context: Context, params: z.infer<typeof AccountsListSchema>) => {
+ schema: AccountsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AccountsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedAccountList>({
method: 'GET',
@@ -369,17 +324,19 @@ const accountsList = (): ToolBase<typeof AccountsListSchema, WithPostHogUrl<Sche
},
})
-const AccountsMeetingsListSchema = AccountsMeetingsListParams.omit({ project_id: true }).extend(
- AccountsMeetingsListQueryParams.shape
-)
+const AccountsMeetingsListSchema = () => {
+ const AccountsMeetingsListParams = orvalSchemas.AccountsMeetingsListParams()
+ const AccountsMeetingsListQueryParams = orvalSchemas.AccountsMeetingsListQueryParams()
+ return AccountsMeetingsListParams.omit({ project_id: true }).extend(AccountsMeetingsListQueryParams.shape)
+}
const accountsMeetingsList = (): ToolBase<
- typeof AccountsMeetingsListSchema,
+ ReturnType<typeof AccountsMeetingsListSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.PaginatedMeetingList>>
> => ({
name: 'accounts-meetings-list',
- schema: AccountsMeetingsListSchema,
- handler: async (context: Context, params: z.infer<typeof AccountsMeetingsListSchema>) => {
+ schema: AccountsMeetingsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AccountsMeetingsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedMeetingList>({
method: 'GET',
@@ -398,14 +355,19 @@ const accountsMeetingsList = (): ToolBase<
},
})
-const AccountsNotebooksCreateSchema = AccountsNotebooksCreateParams.omit({ project_id: true }).extend(
- AccountsNotebooksCreateBody.shape
-)
+const AccountsNotebooksCreateSchema = () => {
+ const AccountsNotebooksCreateBody = orvalSchemas.AccountsNotebooksCreateBody()
+ const AccountsNotebooksCreateParams = orvalSchemas.AccountsNotebooksCreateParams()
+ return AccountsNotebooksCreateParams.omit({ project_id: true }).extend(AccountsNotebooksCreateBody.shape)
+}
-const accountsNotebooksCreate = (): ToolBase<typeof AccountsNotebooksCreateSchema, Schemas.AccountNotebook> => ({
+const accountsNotebooksCreate = (): ToolBase<
+ ReturnType<typeof AccountsNotebooksCreateSchema>,
+ Schemas.AccountNotebook
+> => ({
name: 'accounts-notebooks-create',
- schema: AccountsNotebooksCreateSchema,
- handler: async (context: Context, params: z.infer<typeof AccountsNotebooksCreateSchema>) => {
+ schema: AccountsNotebooksCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AccountsNotebooksCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.title !== undefined) {
@@ -426,12 +388,15 @@ const accountsNotebooksCreate = (): ToolBase<typeof AccountsNotebooksCreateSchem
},
})
-const AccountsNotebooksDestroySchema = AccountsNotebooksDestroyParams.omit({ project_id: true })
+const AccountsNotebooksDestroySchema = () => {
+ const AccountsNotebooksDestroyParams = orvalSchemas.AccountsNotebooksDestroyParams()
+ return AccountsNotebooksDestroyParams.omit({ project_id: true })
+}
-const accountsNotebooksDestroy = (): ToolBase<typeof AccountsNotebooksDestroySchema, unknown> => ({
+const accountsNotebooksDestroy = (): ToolBase<ReturnType<typeof AccountsNotebooksDestroySchema>, unknown> => ({
name: 'accounts-notebooks-destroy',
- schema: AccountsNotebooksDestroySchema,
- handler: async (context: Context, params: z.infer<typeof AccountsNotebooksDestroySchema>) => {
+ schema: AccountsNotebooksDestroySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AccountsNotebooksDestroySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -441,17 +406,19 @@ const accountsNotebooksDestroy = (): ToolBase<typeof AccountsNotebooksDestroySch
},
})
-const AccountsNotebooksListSchema = AccountsNotebooksListParams.omit({ project_id: true }).extend(
- AccountsNotebooksListQueryParams.shape
-)
+const AccountsNotebooksListSchema = () => {
+ const AccountsNotebooksListParams = orvalSchemas.AccountsNotebooksListParams()
+ const AccountsNotebooksListQueryParams = orvalSchemas.AccountsNotebooksListQueryParams()
+ return AccountsNotebooksListParams.omit({ project_id: true }).extend(AccountsNotebooksListQueryParams.shape)
+}
const accountsNotebooksList = (): ToolBase<
- typeof AccountsNotebooksListSchema,
+ ReturnType<typeof AccountsNotebooksListSchema>,
WithPostHogUrl<Schemas.PaginatedAccountNotebookList>
> => ({
name: 'accounts-notebooks-list',
- schema: AccountsNotebooksListSchema,
- handler: async (context: Context, params: z.infer<typeof AccountsNotebooksListSchema>) => {
+ schema: AccountsNotebooksListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AccountsNotebooksListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedAccountNotebookList>({
method: 'GET',
@@ -467,12 +434,18 @@ const accountsNotebooksList = (): ToolBase<
},
})
-const AccountsNotebooksRetrieveSchema = AccountsNotebooksRetrieveParams.omit({ project_id: true })
+const AccountsNotebooksRetrieveSchema = () => {
+ const AccountsNotebooksRetrieveParams = orvalSchemas.AccountsNotebooksRetrieveParams()
+ return AccountsNotebooksRetrieveParams.omit({ project_id: true })
+}
-const accountsNotebooksRetrieve = (): ToolBase<typeof AccountsNotebooksRetrieveSchema, Schemas.AccountNotebook> => ({
+const accountsNotebooksRetrieve = (): ToolBase<
+ ReturnType<typeof AccountsNotebooksRetrieveSchema>,
+ Schemas.AccountNotebook
+> => ({
name: 'accounts-notebooks-retrieve',
- schema: AccountsNotebooksRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof AccountsNotebooksRetrieveSchema>) => {
+ schema: AccountsNotebooksRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AccountsNotebooksRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.AccountNotebook>({
method: 'GET',
@@ -482,21 +455,25 @@ const accountsNotebooksRetrieve = (): ToolBase<typeof AccountsNotebooksRetrieveS
},
})
-const AccountsPartialUpdateSchema = AccountsPartialUpdateParams.omit({ project_id: true })
- .extend(AccountsPartialUpdateBody.shape)
- .extend({
- properties: AccountsPartialUpdateBody.shape['properties'].describe(
- 'Typed account properties. The server replaces the `properties` object as a whole, so include any existing values you want to preserve. Supported keys: `stripe_customer_id`, `hubspot_deal_id`, `billing_id`, `sfdc_id`, `zendesk_id` (optional string identifiers for external systems), plus `email_domains` (company email domains, e.g. ["acme.com"]) and `known_emails` (individual addresses, for contacts on personal domains) which match synced touchpoints such as calendar meetings to this account. To assign users (CSM, account executive, ...), use `accounts-relationships-create` instead.'
- ),
- tags: AccountsPartialUpdateBody.shape['tags'].describe(
- 'Tag names to set on the account. Replaces the full existing tag set — pass the complete list, not a delta. Tags are created on demand if they do not already exist for the team.'
- ),
- })
+const AccountsPartialUpdateSchema = () => {
+ const AccountsPartialUpdateBody = orvalSchemas.AccountsPartialUpdateBody()
+ const AccountsPartialUpdateParams = orvalSchemas.AccountsPartialUpdateParams()
+ return AccountsPartialUpdateParams.omit({ project_id: true })
+ .extend(AccountsPartialUpdateBody.shape)
+ .extend({
+ properties: AccountsPartialUpdateBody.shape['properties'].describe(
+ 'Typed account properties. The server replaces the `properties` object as a whole, so include any existing values you want to preserve. Supported keys: `stripe_customer_id`, `hubspot_deal_id`, `billing_id`, `sfdc_id`, `zendesk_id` (optional string identifiers for external systems), plus `email_domains` (company email domains, e.g. ["acme.com"]) and `known_emails` (individual addresses, for contacts on personal domains) which match synced touchpoints such as calendar meetings to this account. To assign users (CSM, account executive, ...), use `accounts-relationships-create` instead.'
+ ),
+ tags: AccountsPartialUpdateBody.shape['tags'].describe(
+ 'Tag names to set on the account. Replaces the full existing tag set — pass the complete list, not a delta. Tags are created on demand if they do not already exist for the team.'
+ ),
+ })
+}
-const accountsPartialUpdate = (): ToolBase<typeof AccountsPartialUpdateSchema, Schemas.Account> => ({
+const accountsPartialUpdate = (): ToolBase<ReturnType<typeof AccountsPartialUpdateSchema>, Schemas.Account> => ({
name: 'accounts-partial-update',
- schema: AccountsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof AccountsPartialUpdateSchema>) => {
+ schema: AccountsPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AccountsPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -526,17 +503,19 @@ const accountsPartialUpdate = (): ToolBase<typeof AccountsPartialUpdateSchema, S
},
})
-const AccountsRelationshipsCreateSchema = AccountsRelationshipsCreateParams.omit({ project_id: true }).extend(
- AccountsRelationshipsCreateBody.shape
-)
+const AccountsRelationshipsCreateSchema = () => {
+ const AccountsRelationshipsCreateBody = orvalSchemas.AccountsRelationshipsCreateBody()
+ const AccountsRelationshipsCreateParams = orvalSchemas.AccountsRelationshipsCreateParams()
+ return AccountsRelationshipsCreateParams.omit({ project_id: true }).extend(AccountsRelationshipsCreateBody.shape)
+}
const accountsRelationshipsCreate = (): ToolBase<
- typeof AccountsRelationshipsCreateSchema,
+ ReturnType<typeof AccountsRelationshipsCreateSchema>,
Schemas.AccountRelationship
> => ({
name: 'accounts-relationships-create',
- schema: AccountsRelationshipsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof AccountsRelationshipsCreateSchema>) => {
+ schema: AccountsRelationshipsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AccountsRelationshipsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.definition !== undefined) {
@@ -554,15 +533,18 @@ const accountsRelationshipsCreate = (): ToolBase<
},
})
-const AccountsRelationshipsEndCreateSchema = AccountsRelationshipsEndCreateParams.omit({ project_id: true })
+const AccountsRelationshipsEndCreateSchema = () => {
+ const AccountsRelationshipsEndCreateParams = orvalSchemas.AccountsRelationshipsEndCreateParams()
+ return AccountsRelationshipsEndCreateParams.omit({ project_id: true })
+}
const accountsRelationshipsEndCreate = (): ToolBase<
- typeof AccountsRelationshipsEndCreateSchema,
+ ReturnType<typeof AccountsRelationshipsEndCreateSchema>,
Schemas.AccountRelationship
> => ({
name: 'accounts-relationships-end-create',
- schema: AccountsRelationshipsEndCreateSchema,
- handler: async (context: Context, params: z.infer<typeof AccountsRelationshipsEndCreateSchema>) => {
+ schema: AccountsRelationshipsEndCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AccountsRelationshipsEndCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.AccountRelationship>({
method: 'POST',
@@ -572,17 +554,19 @@ const accountsRelationshipsEndCreate = (): ToolBase<
},
})
-const AccountsRelationshipsListSchema = AccountsRelationshipsListParams.omit({ project_id: true }).extend(
- AccountsRelationshipsListQueryParams.shape
-)
+const AccountsRelationshipsListSchema = () => {
+ const AccountsRelationshipsListParams = orvalSchemas.AccountsRelationshipsListParams()
+ const AccountsRelationshipsListQueryParams = orvalSchemas.AccountsRelationshipsListQueryParams()
+ return AccountsRelationshipsListParams.omit({ project_id: true }).extend(AccountsRelationshipsListQueryParams.shape)
+}
const accountsRelationshipsList = (): ToolBase<
- typeof AccountsRelationshipsListSchema,
+ ReturnType<typeof AccountsRelationshipsListSchema>,
WithPostHogUrl<Schemas.AccountRelationship[]>
> => ({
name: 'accounts-relationships-list',
- schema: AccountsRelationshipsListSchema,
- handler: async (context: Context, params: z.infer<typeof AccountsRelationshipsListSchema>) => {
+ schema: AccountsRelationshipsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AccountsRelationshipsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.AccountRelationship[]>({
method: 'GET',
@@ -595,12 +579,15 @@ const accountsRelationshipsList = (): ToolBase<
},
})
-const AccountsRetrieveSchema = AccountsRetrieveParams.omit({ project_id: true })
+const AccountsRetrieveSchema = () => {
+ const AccountsRetrieveParams = orvalSchemas.AccountsRetrieveParams()
+ return AccountsRetrieveParams.omit({ project_id: true })
+}
-const accountsRetrieve = (): ToolBase<typeof AccountsRetrieveSchema, Schemas.Account> => ({
+const accountsRetrieve = (): ToolBase<ReturnType<typeof AccountsRetrieveSchema>, Schemas.Account> => ({
name: 'accounts-retrieve',
- schema: AccountsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof AccountsRetrieveSchema>) => {
+ schema: AccountsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AccountsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Account>({
method: 'GET',
@@ -610,17 +597,19 @@ const accountsRetrieve = (): ToolBase<typeof AccountsRetrieveSchema, Schemas.Acc
},
})
-const AccountsSummariesListSchema = AccountsSummariesListParams.omit({ project_id: true }).extend(
- AccountsSummariesListQueryParams.shape
-)
+const AccountsSummariesListSchema = () => {
+ const AccountsSummariesListParams = orvalSchemas.AccountsSummariesListParams()
+ const AccountsSummariesListQueryParams = orvalSchemas.AccountsSummariesListQueryParams()
+ return AccountsSummariesListParams.omit({ project_id: true }).extend(AccountsSummariesListQueryParams.shape)
+}
const accountsSummariesList = (): ToolBase<
- typeof AccountsSummariesListSchema,
+ ReturnType<typeof AccountsSummariesListSchema>,
WithPostHogUrl<Schemas.PaginatedAccountChannelSummaryList>
> => ({
name: 'accounts-summaries-list',
- schema: AccountsSummariesListSchema,
- handler: async (context: Context, params: z.infer<typeof AccountsSummariesListSchema>) => {
+ schema: AccountsSummariesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AccountsSummariesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedAccountChannelSummaryList>({
method: 'GET',
@@ -634,16 +623,15 @@ const accountsSummariesList = (): ToolBase<
},
})
-const AnnouncementsChannelsListSchema = z.object({})
+const AnnouncementsChannelsListSchema = () => z.object({})
const announcementsChannelsList = (): ToolBase<
- typeof AnnouncementsChannelsListSchema,
+ ReturnType<typeof AnnouncementsChannelsListSchema>,
Schemas.AnnouncementChannel[]
> => ({
name: 'announcements-channels-list',
- schema: AnnouncementsChannelsListSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof AnnouncementsChannelsListSchema>) => {
+ schema: AnnouncementsChannelsListSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof AnnouncementsChannelsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.AnnouncementChannel[]>({
method: 'GET',
@@ -653,7 +641,10 @@ const announcementsChannelsList = (): ToolBase<
},
})
-const AnnouncementsCreateSchema = AnnouncementsCreateBody
+const AnnouncementsCreateSchema = () => {
+ const AnnouncementsCreateBody = orvalSchemas.AnnouncementsCreateBody()
+ return AnnouncementsCreateBody
+}
const AnnouncementsCreateSchemaExecute = z.strictObject({
confirmation_hash: z
@@ -662,10 +653,13 @@ const AnnouncementsCreateSchemaExecute = z.strictObject({
confirmation: z.string().describe('The literal string "confirm", typed by the user in chat. Required to proceed.'),
})
-const announcementsCreatePrepare = (): ToolBase<typeof AnnouncementsCreateSchema, PrepareConfirmedActionResult> => ({
+const announcementsCreatePrepare = (): ToolBase<
+ ReturnType<typeof AnnouncementsCreateSchema>,
+ PrepareConfirmedActionResult
+> => ({
name: 'announcements-create-prepare',
- schema: AnnouncementsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof AnnouncementsCreateSchema>) => {
+ schema: AnnouncementsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AnnouncementsCreateSchema>>) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
return await prepareConfirmedAction(context, {
@@ -687,7 +681,7 @@ const announcementsCreateExecute = (): ToolBase<typeof AnnouncementsCreateSchema
handler: async (context: Context, confirmationParams: z.infer<typeof AnnouncementsCreateSchemaExecute>) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
- const __guard = await executeConfirmedAction<z.infer<typeof AnnouncementsCreateSchema>>(context, {
+ const __guard = await executeConfirmedAction<z.infer<ReturnType<typeof AnnouncementsCreateSchema>>>(context, {
incomingArgs: confirmationParams,
purpose: 'announcements-create',
codec: __runtime.codec,
@@ -716,15 +710,18 @@ const announcementsCreateExecute = (): ToolBase<typeof AnnouncementsCreateSchema
},
})
-const AnnouncementsListSchema = AnnouncementsListQueryParams
+const AnnouncementsListSchema = () => {
+ const AnnouncementsListQueryParams = orvalSchemas.AnnouncementsListQueryParams()
+ return AnnouncementsListQueryParams
+}
const announcementsList = (): ToolBase<
- typeof AnnouncementsListSchema,
+ ReturnType<typeof AnnouncementsListSchema>,
WithPostHogUrl<Schemas.PaginatedAnnouncementList>
> => ({
name: 'announcements-list',
- schema: AnnouncementsListSchema,
- handler: async (context: Context, params: z.infer<typeof AnnouncementsListSchema>) => {
+ schema: AnnouncementsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AnnouncementsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedAnnouncementList>({
method: 'GET',
@@ -742,12 +739,15 @@ const announcementsList = (): ToolBase<
},
})
-const AnnouncementsRetrieveSchema = AnnouncementsRetrieveParams.omit({ project_id: true })
+const AnnouncementsRetrieveSchema = () => {
+ const AnnouncementsRetrieveParams = orvalSchemas.AnnouncementsRetrieveParams()
+ return AnnouncementsRetrieveParams.omit({ project_id: true })
+}
-const announcementsRetrieve = (): ToolBase<typeof AnnouncementsRetrieveSchema, Schemas.Announcement> => ({
+const announcementsRetrieve = (): ToolBase<ReturnType<typeof AnnouncementsRetrieveSchema>, Schemas.Announcement> => ({
name: 'announcements-retrieve',
- schema: AnnouncementsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof AnnouncementsRetrieveSchema>) => {
+ schema: AnnouncementsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AnnouncementsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Announcement>({
method: 'GET',
@@ -757,15 +757,18 @@ const announcementsRetrieve = (): ToolBase<typeof AnnouncementsRetrieveSchema, S
},
})
-const CustomPropertyDefinitionsCreateSchema = CustomPropertyDefinitionsCreateBody
+const CustomPropertyDefinitionsCreateSchema = () => {
+ const CustomPropertyDefinitionsCreateBody = orvalSchemas.CustomPropertyDefinitionsCreateBody()
+ return CustomPropertyDefinitionsCreateBody
+}
const customPropertyDefinitionsCreate = (): ToolBase<
- typeof CustomPropertyDefinitionsCreateSchema,
+ ReturnType<typeof CustomPropertyDefinitionsCreateSchema>,
Schemas.CustomPropertyDefinition
> => ({
name: 'custom-property-definitions-create',
- schema: CustomPropertyDefinitionsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof CustomPropertyDefinitionsCreateSchema>) => {
+ schema: CustomPropertyDefinitionsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CustomPropertyDefinitionsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -798,12 +801,18 @@ const customPropertyDefinitionsCreate = (): ToolBase<
},
})
-const CustomPropertyDefinitionsDestroySchema = CustomPropertyDefinitionsDestroyParams.omit({ project_id: true })
+const CustomPropertyDefinitionsDestroySchema = () => {
+ const CustomPropertyDefinitionsDestroyParams = orvalSchemas.CustomPropertyDefinitionsDestroyParams()
+ return CustomPropertyDefinitionsDestroyParams.omit({ project_id: true })
+}
-const customPropertyDefinitionsDestroy = (): ToolBase<typeof CustomPropertyDefinitionsDestroySchema, unknown> => ({
+const customPropertyDefinitionsDestroy = (): ToolBase<
+ ReturnType<typeof CustomPropertyDefinitionsDestroySchema>,
+ unknown
+> => ({
name: 'custom-property-definitions-destroy',
- schema: CustomPropertyDefinitionsDestroySchema,
- handler: async (context: Context, params: z.infer<typeof CustomPropertyDefinitionsDestroySchema>) => {
+ schema: CustomPropertyDefinitionsDestroySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CustomPropertyDefinitionsDestroySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -813,15 +822,18 @@ const customPropertyDefinitionsDestroy = (): ToolBase<typeof CustomPropertyDefin
},
})
-const CustomPropertyDefinitionsListSchema = CustomPropertyDefinitionsListQueryParams
+const CustomPropertyDefinitionsListSchema = () => {
+ const CustomPropertyDefinitionsListQueryParams = orvalSchemas.CustomPropertyDefinitionsListQueryParams()
+ return CustomPropertyDefinitionsListQueryParams
+}
const customPropertyDefinitionsList = (): ToolBase<
- typeof CustomPropertyDefinitionsListSchema,
+ ReturnType<typeof CustomPropertyDefinitionsListSchema>,
WithPostHogUrl<Schemas.PaginatedCustomPropertyDefinitionList>
> => ({
name: 'custom-property-definitions-list',
- schema: CustomPropertyDefinitionsListSchema,
- handler: async (context: Context, params: z.infer<typeof CustomPropertyDefinitionsListSchema>) => {
+ schema: CustomPropertyDefinitionsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CustomPropertyDefinitionsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedCustomPropertyDefinitionList>({
method: 'GET',
@@ -835,17 +847,24 @@ const customPropertyDefinitionsList = (): ToolBase<
},
})
-const CustomPropertyDefinitionsPartialUpdateSchema = CustomPropertyDefinitionsPartialUpdateParams.omit({
- project_id: true,
-}).extend(CustomPropertyDefinitionsPartialUpdateBody.shape)
+const CustomPropertyDefinitionsPartialUpdateSchema = () => {
+ const CustomPropertyDefinitionsPartialUpdateBody = orvalSchemas.CustomPropertyDefinitionsPartialUpdateBody()
+ const CustomPropertyDefinitionsPartialUpdateParams = orvalSchemas.CustomPropertyDefinitionsPartialUpdateParams()
+ return CustomPropertyDefinitionsPartialUpdateParams.omit({ project_id: true }).extend(
+ CustomPropertyDefinitionsPartialUpdateBody.shape
+ )
+}
const customPropertyDefinitionsPartialUpdate = (): ToolBase<
- typeof CustomPropertyDefinitionsPartialUpdateSchema,
+ ReturnType<typeof CustomPropertyDefinitionsPartialUpdateSchema>,
Schemas.CustomPropertyDefinition
> => ({
name: 'custom-property-definitions-partial-update',
- schema: CustomPropertyDefinitionsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof CustomPropertyDefinitionsPartialUpdateSchema>) => {
+ schema: CustomPropertyDefinitionsPartialUpdateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof CustomPropertyDefinitionsPartialUpdateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -878,15 +897,18 @@ const customPropertyDefinitionsPartialUpdate = (): ToolBase<
},
})
-const CustomPropertyDefinitionsRetrieveSchema = CustomPropertyDefinitionsRetrieveParams.omit({ project_id: true })
+const CustomPropertyDefinitionsRetrieveSchema = () => {
+ const CustomPropertyDefinitionsRetrieveParams = orvalSchemas.CustomPropertyDefinitionsRetrieveParams()
+ return CustomPropertyDefinitionsRetrieveParams.omit({ project_id: true })
+}
const customPropertyDefinitionsRetrieve = (): ToolBase<
- typeof CustomPropertyDefinitionsRetrieveSchema,
+ ReturnType<typeof CustomPropertyDefinitionsRetrieveSchema>,
Schemas.CustomPropertyDefinition
> => ({
name: 'custom-property-definitions-retrieve',
- schema: CustomPropertyDefinitionsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof CustomPropertyDefinitionsRetrieveSchema>) => {
+ schema: CustomPropertyDefinitionsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CustomPropertyDefinitionsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.CustomPropertyDefinition>({
method: 'GET',
@@ -896,12 +918,18 @@ const customPropertyDefinitionsRetrieve = (): ToolBase<
},
})
-const CustomPropertySourcesBackfillSchema = CustomPropertySourcesBackfillParams.omit({ project_id: true })
+const CustomPropertySourcesBackfillSchema = () => {
+ const CustomPropertySourcesBackfillParams = orvalSchemas.CustomPropertySourcesBackfillParams()
+ return CustomPropertySourcesBackfillParams.omit({ project_id: true })
+}
-const customPropertySourcesBackfill = (): ToolBase<typeof CustomPropertySourcesBackfillSchema, unknown> => ({
+const customPropertySourcesBackfill = (): ToolBase<
+ ReturnType<typeof CustomPropertySourcesBackfillSchema>,
+ unknown
+> => ({
name: 'custom-property-sources-backfill',
- schema: CustomPropertySourcesBackfillSchema,
- handler: async (context: Context, params: z.infer<typeof CustomPropertySourcesBackfillSchema>) => {
+ schema: CustomPropertySourcesBackfillSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CustomPropertySourcesBackfillSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'POST',
@@ -911,15 +939,18 @@ const customPropertySourcesBackfill = (): ToolBase<typeof CustomPropertySourcesB
},
})
-const CustomPropertySourcesCreateSchema = CustomPropertySourcesCreateBody
+const CustomPropertySourcesCreateSchema = () => {
+ const CustomPropertySourcesCreateBody = orvalSchemas.CustomPropertySourcesCreateBody()
+ return CustomPropertySourcesCreateBody
+}
const customPropertySourcesCreate = (): ToolBase<
- typeof CustomPropertySourcesCreateSchema,
+ ReturnType<typeof CustomPropertySourcesCreateSchema>,
Schemas.CustomPropertySource
> => ({
name: 'custom-property-sources-create',
- schema: CustomPropertySourcesCreateSchema,
- handler: async (context: Context, params: z.infer<typeof CustomPropertySourcesCreateSchema>) => {
+ schema: CustomPropertySourcesCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CustomPropertySourcesCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.definition !== undefined) {
@@ -955,12 +986,15 @@ const customPropertySourcesCreate = (): ToolBase<
},
})
-const CustomPropertySourcesDestroySchema = CustomPropertySourcesDestroyParams.omit({ project_id: true })
+const CustomPropertySourcesDestroySchema = () => {
+ const CustomPropertySourcesDestroyParams = orvalSchemas.CustomPropertySourcesDestroyParams()
+ return CustomPropertySourcesDestroyParams.omit({ project_id: true })
+}
-const customPropertySourcesDestroy = (): ToolBase<typeof CustomPropertySourcesDestroySchema, unknown> => ({
+const customPropertySourcesDestroy = (): ToolBase<ReturnType<typeof CustomPropertySourcesDestroySchema>, unknown> => ({
name: 'custom-property-sources-destroy',
- schema: CustomPropertySourcesDestroySchema,
- handler: async (context: Context, params: z.infer<typeof CustomPropertySourcesDestroySchema>) => {
+ schema: CustomPropertySourcesDestroySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CustomPropertySourcesDestroySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -970,15 +1004,18 @@ const customPropertySourcesDestroy = (): ToolBase<typeof CustomPropertySourcesDe
},
})
-const CustomPropertySourcesListSchema = CustomPropertySourcesListQueryParams
+const CustomPropertySourcesListSchema = () => {
+ const CustomPropertySourcesListQueryParams = orvalSchemas.CustomPropertySourcesListQueryParams()
+ return CustomPropertySourcesListQueryParams
+}
const customPropertySourcesList = (): ToolBase<
- typeof CustomPropertySourcesListSchema,
+ ReturnType<typeof CustomPropertySourcesListSchema>,
WithPostHogUrl<Schemas.PaginatedCustomPropertySourceList>
> => ({
name: 'custom-property-sources-list',
- schema: CustomPropertySourcesListSchema,
- handler: async (context: Context, params: z.infer<typeof CustomPropertySourcesListSchema>) => {
+ schema: CustomPropertySourcesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CustomPropertySourcesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedCustomPropertySourceList>({
method: 'GET',
@@ -992,17 +1029,21 @@ const customPropertySourcesList = (): ToolBase<
},
})
-const CustomPropertySourcesPartialUpdateSchema = CustomPropertySourcesPartialUpdateParams.omit({
- project_id: true,
-}).extend(CustomPropertySourcesPartialUpdateBody.shape)
+const CustomPropertySourcesPartialUpdateSchema = () => {
+ const CustomPropertySourcesPartialUpdateBody = orvalSchemas.CustomPropertySourcesPartialUpdateBody()
+ const CustomPropertySourcesPartialUpdateParams = orvalSchemas.CustomPropertySourcesPartialUpdateParams()
+ return CustomPropertySourcesPartialUpdateParams.omit({ project_id: true }).extend(
+ CustomPropertySourcesPartialUpdateBody.shape
+ )
+}
const customPropertySourcesPartialUpdate = (): ToolBase<
- typeof CustomPropertySourcesPartialUpdateSchema,
+ ReturnType<typeof CustomPropertySourcesPartialUpdateSchema>,
Schemas.CustomPropertySource
> => ({
name: 'custom-property-sources-partial-update',
- schema: CustomPropertySourcesPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof CustomPropertySourcesPartialUpdateSchema>) => {
+ schema: CustomPropertySourcesPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CustomPropertySourcesPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.source_column !== undefined) {
@@ -1023,15 +1064,18 @@ const customPropertySourcesPartialUpdate = (): ToolBase<
},
})
-const CustomPropertySourcesRetrieveSchema = CustomPropertySourcesRetrieveParams.omit({ project_id: true })
+const CustomPropertySourcesRetrieveSchema = () => {
+ const CustomPropertySourcesRetrieveParams = orvalSchemas.CustomPropertySourcesRetrieveParams()
+ return CustomPropertySourcesRetrieveParams.omit({ project_id: true })
+}
const customPropertySourcesRetrieve = (): ToolBase<
- typeof CustomPropertySourcesRetrieveSchema,
+ ReturnType<typeof CustomPropertySourcesRetrieveSchema>,
Schemas.CustomPropertySource
> => ({
name: 'custom-property-sources-retrieve',
- schema: CustomPropertySourcesRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof CustomPropertySourcesRetrieveSchema>) => {
+ schema: CustomPropertySourcesRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CustomPropertySourcesRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.CustomPropertySource>({
method: 'GET',
@@ -1041,17 +1085,21 @@ const customPropertySourcesRetrieve = (): ToolBase<
},
})
-const CustomPropertySourcesRunsListSchema = CustomPropertySourcesRunsListParams.omit({ project_id: true }).extend(
- CustomPropertySourcesRunsListQueryParams.shape
-)
+const CustomPropertySourcesRunsListSchema = () => {
+ const CustomPropertySourcesRunsListParams = orvalSchemas.CustomPropertySourcesRunsListParams()
+ const CustomPropertySourcesRunsListQueryParams = orvalSchemas.CustomPropertySourcesRunsListQueryParams()
+ return CustomPropertySourcesRunsListParams.omit({ project_id: true }).extend(
+ CustomPropertySourcesRunsListQueryParams.shape
+ )
+}
const customPropertySourcesRunsList = (): ToolBase<
- typeof CustomPropertySourcesRunsListSchema,
+ ReturnType<typeof CustomPropertySourcesRunsListSchema>,
WithPostHogUrl<Schemas.PaginatedCustomPropertySyncRunList>
> => ({
name: 'custom-property-sources-runs-list',
- schema: CustomPropertySourcesRunsListSchema,
- handler: async (context: Context, params: z.infer<typeof CustomPropertySourcesRunsListSchema>) => {
+ schema: CustomPropertySourcesRunsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CustomPropertySourcesRunsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedCustomPropertySyncRunList>({
method: 'GET',
@@ -1066,12 +1114,15 @@ const customPropertySourcesRunsList = (): ToolBase<
},
})
-const CustomPropertySourcesSyncSchema = CustomPropertySourcesSyncParams.omit({ project_id: true })
+const CustomPropertySourcesSyncSchema = () => {
+ const CustomPropertySourcesSyncParams = orvalSchemas.CustomPropertySourcesSyncParams()
+ return CustomPropertySourcesSyncParams.omit({ project_id: true })
+}
-const customPropertySourcesSync = (): ToolBase<typeof CustomPropertySourcesSyncSchema, unknown> => ({
+const customPropertySourcesSync = (): ToolBase<ReturnType<typeof CustomPropertySourcesSyncSchema>, unknown> => ({
name: 'custom-property-sources-sync',
- schema: CustomPropertySourcesSyncSchema,
- handler: async (context: Context, params: z.infer<typeof CustomPropertySourcesSyncSchema>) => {
+ schema: CustomPropertySourcesSyncSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CustomPropertySourcesSyncSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'POST',
@@ -1081,14 +1132,16 @@ const customPropertySourcesSync = (): ToolBase<typeof CustomPropertySourcesSyncS
},
})
-const EventStreamsAddAccountSchema = EventStreamsAddAccountCreateParams.omit({ project_id: true }).extend(
- EventStreamsAddAccountCreateBody.shape
-)
+const EventStreamsAddAccountSchema = () => {
+ const EventStreamsAddAccountCreateBody = orvalSchemas.EventStreamsAddAccountCreateBody()
+ const EventStreamsAddAccountCreateParams = orvalSchemas.EventStreamsAddAccountCreateParams()
+ return EventStreamsAddAccountCreateParams.omit({ project_id: true }).extend(EventStreamsAddAccountCreateBody.shape)
+}
-const eventStreamsAddAccount = (): ToolBase<typeof EventStreamsAddAccountSchema, Schemas.EventStream> => ({
+const eventStreamsAddAccount = (): ToolBase<ReturnType<typeof EventStreamsAddAccountSchema>, Schemas.EventStream> => ({
name: 'event-streams-add-account',
- schema: EventStreamsAddAccountSchema,
- handler: async (context: Context, params: z.infer<typeof EventStreamsAddAccountSchema>) => {
+ schema: EventStreamsAddAccountSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EventStreamsAddAccountSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.account_id !== undefined) {
@@ -1103,12 +1156,15 @@ const eventStreamsAddAccount = (): ToolBase<typeof EventStreamsAddAccountSchema,
},
})
-const EventStreamsCreateSchema = EventStreamsCreateBody
+const EventStreamsCreateSchema = () => {
+ const EventStreamsCreateBody = orvalSchemas.EventStreamsCreateBody()
+ return EventStreamsCreateBody
+}
-const eventStreamsCreate = (): ToolBase<typeof EventStreamsCreateSchema, Schemas.EventStream> => ({
+const eventStreamsCreate = (): ToolBase<ReturnType<typeof EventStreamsCreateSchema>, Schemas.EventStream> => ({
name: 'event-streams-create',
- schema: EventStreamsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof EventStreamsCreateSchema>) => {
+ schema: EventStreamsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EventStreamsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.enabled !== undefined) {
@@ -1135,12 +1191,15 @@ const eventStreamsCreate = (): ToolBase<typeof EventStreamsCreateSchema, Schemas
},
})
-const EventStreamsDestroySchema = EventStreamsDestroyParams.omit({ project_id: true })
+const EventStreamsDestroySchema = () => {
+ const EventStreamsDestroyParams = orvalSchemas.EventStreamsDestroyParams()
+ return EventStreamsDestroyParams.omit({ project_id: true })
+}
-const eventStreamsDestroy = (): ToolBase<typeof EventStreamsDestroySchema, unknown> => ({
+const eventStreamsDestroy = (): ToolBase<ReturnType<typeof EventStreamsDestroySchema>, unknown> => ({
name: 'event-streams-destroy',
- schema: EventStreamsDestroySchema,
- handler: async (context: Context, params: z.infer<typeof EventStreamsDestroySchema>) => {
+ schema: EventStreamsDestroySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EventStreamsDestroySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -1150,13 +1209,12 @@ const eventStreamsDestroy = (): ToolBase<typeof EventStreamsDestroySchema, unkno
},
})
-const EventStreamsListSchema = z.object({})
+const EventStreamsListSchema = () => z.object({})
-const eventStreamsList = (): ToolBase<typeof EventStreamsListSchema, Schemas.EventStream[]> => ({
+const eventStreamsList = (): ToolBase<ReturnType<typeof EventStreamsListSchema>, Schemas.EventStream[]> => ({
name: 'event-streams-list',
- schema: EventStreamsListSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof EventStreamsListSchema>) => {
+ schema: EventStreamsListSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof EventStreamsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.EventStream[]>({
method: 'GET',
@@ -1166,14 +1224,19 @@ const eventStreamsList = (): ToolBase<typeof EventStreamsListSchema, Schemas.Eve
},
})
-const EventStreamsPartialUpdateSchema = EventStreamsPartialUpdateParams.omit({ project_id: true }).extend(
- EventStreamsPartialUpdateBody.shape
-)
+const EventStreamsPartialUpdateSchema = () => {
+ const EventStreamsPartialUpdateBody = orvalSchemas.EventStreamsPartialUpdateBody()
+ const EventStreamsPartialUpdateParams = orvalSchemas.EventStreamsPartialUpdateParams()
+ return EventStreamsPartialUpdateParams.omit({ project_id: true }).extend(EventStreamsPartialUpdateBody.shape)
+}
-const eventStreamsPartialUpdate = (): ToolBase<typeof EventStreamsPartialUpdateSchema, Schemas.EventStream> => ({
+const eventStreamsPartialUpdate = (): ToolBase<
+ ReturnType<typeof EventStreamsPartialUpdateSchema>,
+ Schemas.EventStream
+> => ({
name: 'event-streams-partial-update',
- schema: EventStreamsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof EventStreamsPartialUpdateSchema>) => {
+ schema: EventStreamsPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EventStreamsPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.enabled !== undefined) {
@@ -1200,14 +1263,21 @@ const eventStreamsPartialUpdate = (): ToolBase<typeof EventStreamsPartialUpdateS
},
})
-const EventStreamsRemoveAccountSchema = EventStreamsRemoveAccountCreateParams.omit({ project_id: true }).extend(
- EventStreamsRemoveAccountCreateBody.shape
-)
+const EventStreamsRemoveAccountSchema = () => {
+ const EventStreamsRemoveAccountCreateBody = orvalSchemas.EventStreamsRemoveAccountCreateBody()
+ const EventStreamsRemoveAccountCreateParams = orvalSchemas.EventStreamsRemoveAccountCreateParams()
+ return EventStreamsRemoveAccountCreateParams.omit({ project_id: true }).extend(
+ EventStreamsRemoveAccountCreateBody.shape
+ )
+}
-const eventStreamsRemoveAccount = (): ToolBase<typeof EventStreamsRemoveAccountSchema, Schemas.EventStream> => ({
+const eventStreamsRemoveAccount = (): ToolBase<
+ ReturnType<typeof EventStreamsRemoveAccountSchema>,
+ Schemas.EventStream
+> => ({
name: 'event-streams-remove-account',
- schema: EventStreamsRemoveAccountSchema,
- handler: async (context: Context, params: z.infer<typeof EventStreamsRemoveAccountSchema>) => {
+ schema: EventStreamsRemoveAccountSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EventStreamsRemoveAccountSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.account_id !== undefined) {
@@ -1222,15 +1292,18 @@ const eventStreamsRemoveAccount = (): ToolBase<typeof EventStreamsRemoveAccountS
},
})
-const EventStreamsSendTestMessageSchema = EventStreamsSendTestMessageCreateParams.omit({ project_id: true })
+const EventStreamsSendTestMessageSchema = () => {
+ const EventStreamsSendTestMessageCreateParams = orvalSchemas.EventStreamsSendTestMessageCreateParams()
+ return EventStreamsSendTestMessageCreateParams.omit({ project_id: true })
+}
const eventStreamsSendTestMessage = (): ToolBase<
- typeof EventStreamsSendTestMessageSchema,
+ ReturnType<typeof EventStreamsSendTestMessageSchema>,
Schemas.EventStreamTestMessage
> => ({
name: 'event-streams-send-test-message',
- schema: EventStreamsSendTestMessageSchema,
- handler: async (context: Context, params: z.infer<typeof EventStreamsSendTestMessageSchema>) => {
+ schema: EventStreamsSendTestMessageSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EventStreamsSendTestMessageSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.EventStreamTestMessage>({
method: 'POST',
@@ -1240,15 +1313,18 @@ const eventStreamsSendTestMessage = (): ToolBase<
},
})
-const FeatureRequestProductAreasCreateSchema = FeatureRequestProductAreasCreateBody
+const FeatureRequestProductAreasCreateSchema = () => {
+ const FeatureRequestProductAreasCreateBody = orvalSchemas.FeatureRequestProductAreasCreateBody()
+ return FeatureRequestProductAreasCreateBody
+}
const featureRequestProductAreasCreate = (): ToolBase<
- typeof FeatureRequestProductAreasCreateSchema,
+ ReturnType<typeof FeatureRequestProductAreasCreateSchema>,
Schemas.FeatureRequestProductArea
> => ({
name: 'feature-request-product-areas-create',
- schema: FeatureRequestProductAreasCreateSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureRequestProductAreasCreateSchema>) => {
+ schema: FeatureRequestProductAreasCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureRequestProductAreasCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -1269,15 +1345,18 @@ const featureRequestProductAreasCreate = (): ToolBase<
},
})
-const FeatureRequestProductAreasListSchema = FeatureRequestProductAreasListQueryParams
+const FeatureRequestProductAreasListSchema = () => {
+ const FeatureRequestProductAreasListQueryParams = orvalSchemas.FeatureRequestProductAreasListQueryParams()
+ return FeatureRequestProductAreasListQueryParams
+}
const featureRequestProductAreasList = (): ToolBase<
- typeof FeatureRequestProductAreasListSchema,
+ ReturnType<typeof FeatureRequestProductAreasListSchema>,
WithPostHogUrl<Schemas.FeatureRequestProductArea[]>
> => ({
name: 'feature-request-product-areas-list',
- schema: FeatureRequestProductAreasListSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureRequestProductAreasListSchema>) => {
+ schema: FeatureRequestProductAreasListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureRequestProductAreasListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.FeatureRequestProductArea[]>({
method: 'GET',
@@ -1290,17 +1369,24 @@ const featureRequestProductAreasList = (): ToolBase<
},
})
-const FeatureRequestProductAreasPartialUpdateSchema = FeatureRequestProductAreasPartialUpdateParams.omit({
- project_id: true,
-}).extend(FeatureRequestProductAreasPartialUpdateBody.shape)
+const FeatureRequestProductAreasPartialUpdateSchema = () => {
+ const FeatureRequestProductAreasPartialUpdateBody = orvalSchemas.FeatureRequestProductAreasPartialUpdateBody()
+ const FeatureRequestProductAreasPartialUpdateParams = orvalSchemas.FeatureRequestProductAreasPartialUpdateParams()
+ return FeatureRequestProductAreasPartialUpdateParams.omit({ project_id: true }).extend(
+ FeatureRequestProductAreasPartialUpdateBody.shape
+ )
+}
const featureRequestProductAreasPartialUpdate = (): ToolBase<
- typeof FeatureRequestProductAreasPartialUpdateSchema,
+ ReturnType<typeof FeatureRequestProductAreasPartialUpdateSchema>,
Schemas.FeatureRequestProductArea
> => ({
name: 'feature-request-product-areas-partial-update',
- schema: FeatureRequestProductAreasPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureRequestProductAreasPartialUpdateSchema>) => {
+ schema: FeatureRequestProductAreasPartialUpdateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof FeatureRequestProductAreasPartialUpdateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -1321,17 +1407,21 @@ const featureRequestProductAreasPartialUpdate = (): ToolBase<
},
})
-const FeatureRequestsAddAccountCreateSchema = FeatureRequestsAddAccountCreateParams.omit({ project_id: true }).extend(
- FeatureRequestsAddAccountCreateBody.shape
-)
+const FeatureRequestsAddAccountCreateSchema = () => {
+ const FeatureRequestsAddAccountCreateBody = orvalSchemas.FeatureRequestsAddAccountCreateBody()
+ const FeatureRequestsAddAccountCreateParams = orvalSchemas.FeatureRequestsAddAccountCreateParams()
+ return FeatureRequestsAddAccountCreateParams.omit({ project_id: true }).extend(
+ FeatureRequestsAddAccountCreateBody.shape
+ )
+}
const featureRequestsAddAccountCreate = (): ToolBase<
- typeof FeatureRequestsAddAccountCreateSchema,
+ ReturnType<typeof FeatureRequestsAddAccountCreateSchema>,
WithPostHogUrl<Schemas.FeatureRequest>
> => ({
name: 'feature-requests-add-account-create',
- schema: FeatureRequestsAddAccountCreateSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureRequestsAddAccountCreateSchema>) => {
+ schema: FeatureRequestsAddAccountCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureRequestsAddAccountCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.expected_version !== undefined) {
@@ -1352,17 +1442,21 @@ const featureRequestsAddAccountCreate = (): ToolBase<
},
})
-const FeatureRequestsAddEvidenceCreateSchema = FeatureRequestsAddEvidenceCreateParams.omit({ project_id: true }).extend(
- FeatureRequestsAddEvidenceCreateBody.shape
-)
+const FeatureRequestsAddEvidenceCreateSchema = () => {
+ const FeatureRequestsAddEvidenceCreateBody = orvalSchemas.FeatureRequestsAddEvidenceCreateBody()
+ const FeatureRequestsAddEvidenceCreateParams = orvalSchemas.FeatureRequestsAddEvidenceCreateParams()
+ return FeatureRequestsAddEvidenceCreateParams.omit({ project_id: true }).extend(
+ FeatureRequestsAddEvidenceCreateBody.shape
+ )
+}
const featureRequestsAddEvidenceCreate = (): ToolBase<
- typeof FeatureRequestsAddEvidenceCreateSchema,
+ ReturnType<typeof FeatureRequestsAddEvidenceCreateSchema>,
WithPostHogUrl<Schemas.FeatureRequest>
> => ({
name: 'feature-requests-add-evidence-create',
- schema: FeatureRequestsAddEvidenceCreateSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureRequestsAddEvidenceCreateSchema>) => {
+ schema: FeatureRequestsAddEvidenceCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureRequestsAddEvidenceCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.summary !== undefined) {
@@ -1398,17 +1492,19 @@ const featureRequestsAddEvidenceCreate = (): ToolBase<
},
})
-const FeatureRequestsArchiveCreateSchema = FeatureRequestsArchiveCreateParams.omit({ project_id: true }).extend(
- FeatureRequestsArchiveCreateBody.shape
-)
+const FeatureRequestsArchiveCreateSchema = () => {
+ const FeatureRequestsArchiveCreateBody = orvalSchemas.FeatureRequestsArchiveCreateBody()
+ const FeatureRequestsArchiveCreateParams = orvalSchemas.FeatureRequestsArchiveCreateParams()
+ return FeatureRequestsArchiveCreateParams.omit({ project_id: true }).extend(FeatureRequestsArchiveCreateBody.shape)
+}
const featureRequestsArchiveCreate = (): ToolBase<
- typeof FeatureRequestsArchiveCreateSchema,
+ ReturnType<typeof FeatureRequestsArchiveCreateSchema>,
WithPostHogUrl<Schemas.FeatureRequest>
> => ({
name: 'feature-requests-archive-create',
- schema: FeatureRequestsArchiveCreateSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureRequestsArchiveCreateSchema>) => {
+ schema: FeatureRequestsArchiveCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureRequestsArchiveCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.expected_version !== undefined) {
@@ -1423,15 +1519,18 @@ const featureRequestsArchiveCreate = (): ToolBase<
},
})
-const FeatureRequestsCreateSchema = FeatureRequestsCreateBody
+const FeatureRequestsCreateSchema = () => {
+ const FeatureRequestsCreateBody = orvalSchemas.FeatureRequestsCreateBody()
+ return FeatureRequestsCreateBody
+}
const featureRequestsCreate = (): ToolBase<
- typeof FeatureRequestsCreateSchema,
+ ReturnType<typeof FeatureRequestsCreateSchema>,
WithPostHogUrl<Schemas.FeatureRequest>
> => ({
name: 'feature-requests-create',
- schema: FeatureRequestsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureRequestsCreateSchema>) => {
+ schema: FeatureRequestsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureRequestsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.title !== undefined) {
@@ -1461,15 +1560,18 @@ const featureRequestsCreate = (): ToolBase<
},
})
-const FeatureRequestsHistoryListSchema = FeatureRequestsHistoryListParams.omit({ project_id: true })
+const FeatureRequestsHistoryListSchema = () => {
+ const FeatureRequestsHistoryListParams = orvalSchemas.FeatureRequestsHistoryListParams()
+ return FeatureRequestsHistoryListParams.omit({ project_id: true })
+}
const featureRequestsHistoryList = (): ToolBase<
- typeof FeatureRequestsHistoryListSchema,
+ ReturnType<typeof FeatureRequestsHistoryListSchema>,
WithPostHogUrl<Schemas.FeatureRequestHistory[]>
> => ({
name: 'feature-requests-history-list',
- schema: FeatureRequestsHistoryListSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureRequestsHistoryListSchema>) => {
+ schema: FeatureRequestsHistoryListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureRequestsHistoryListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.FeatureRequestHistory[]>({
method: 'GET',
@@ -1479,15 +1581,18 @@ const featureRequestsHistoryList = (): ToolBase<
},
})
-const FeatureRequestsListSchema = FeatureRequestsListQueryParams
+const FeatureRequestsListSchema = () => {
+ const FeatureRequestsListQueryParams = orvalSchemas.FeatureRequestsListQueryParams()
+ return FeatureRequestsListQueryParams
+}
const featureRequestsList = (): ToolBase<
- typeof FeatureRequestsListSchema,
+ ReturnType<typeof FeatureRequestsListSchema>,
WithPostHogUrl<Schemas.PaginatedFeatureRequestList>
> => ({
name: 'feature-requests-list',
- schema: FeatureRequestsListSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureRequestsListSchema>) => {
+ schema: FeatureRequestsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureRequestsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedFeatureRequestList>({
method: 'GET',
@@ -1520,17 +1625,21 @@ const featureRequestsList = (): ToolBase<
},
})
-const FeatureRequestsPartialUpdateSchema = FeatureRequestsPartialUpdateParams.omit({ project_id: true })
- .extend(FeatureRequestsPartialUpdateBody.shape)
- .extend({ expected_version: FeatureRequestsPartialUpdateBody.shape['expected_version'].unwrap() })
+const FeatureRequestsPartialUpdateSchema = () => {
+ const FeatureRequestsPartialUpdateBody = orvalSchemas.FeatureRequestsPartialUpdateBody()
+ const FeatureRequestsPartialUpdateParams = orvalSchemas.FeatureRequestsPartialUpdateParams()
+ return FeatureRequestsPartialUpdateParams.omit({ project_id: true })
+ .extend(FeatureRequestsPartialUpdateBody.shape)
+ .extend({ expected_version: FeatureRequestsPartialUpdateBody.shape['expected_version'].unwrap() })
+}
const featureRequestsPartialUpdate = (): ToolBase<
- typeof FeatureRequestsPartialUpdateSchema,
+ ReturnType<typeof FeatureRequestsPartialUpdateSchema>,
WithPostHogUrl<Schemas.FeatureRequest>
> => ({
name: 'feature-requests-partial-update',
- schema: FeatureRequestsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureRequestsPartialUpdateSchema>) => {
+ schema: FeatureRequestsPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureRequestsPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.expected_version !== undefined) {
@@ -1566,17 +1675,24 @@ const featureRequestsPartialUpdate = (): ToolBase<
},
})
-const FeatureRequestsRemoveEvidenceCreateSchema = FeatureRequestsRemoveEvidenceCreateParams.omit({
- project_id: true,
-}).extend(FeatureRequestsRemoveEvidenceCreateBody.shape)
+const FeatureRequestsRemoveEvidenceCreateSchema = () => {
+ const FeatureRequestsRemoveEvidenceCreateBody = orvalSchemas.FeatureRequestsRemoveEvidenceCreateBody()
+ const FeatureRequestsRemoveEvidenceCreateParams = orvalSchemas.FeatureRequestsRemoveEvidenceCreateParams()
+ return FeatureRequestsRemoveEvidenceCreateParams.omit({ project_id: true }).extend(
+ FeatureRequestsRemoveEvidenceCreateBody.shape
+ )
+}
const featureRequestsRemoveEvidenceCreate = (): ToolBase<
- typeof FeatureRequestsRemoveEvidenceCreateSchema,
+ ReturnType<typeof FeatureRequestsRemoveEvidenceCreateSchema>,
WithPostHogUrl<Schemas.FeatureRequest>
> => ({
name: 'feature-requests-remove-evidence-create',
- schema: FeatureRequestsRemoveEvidenceCreateSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureRequestsRemoveEvidenceCreateSchema>) => {
+ schema: FeatureRequestsRemoveEvidenceCreateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof FeatureRequestsRemoveEvidenceCreateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.expected_version !== undefined) {
@@ -1594,17 +1710,19 @@ const featureRequestsRemoveEvidenceCreate = (): ToolBase<
},
})
-const FeatureRequestsRestoreCreateSchema = FeatureRequestsRestoreCreateParams.omit({ project_id: true }).extend(
- FeatureRequestsRestoreCreateBody.shape
-)
+const FeatureRequestsRestoreCreateSchema = () => {
+ const FeatureRequestsRestoreCreateBody = orvalSchemas.FeatureRequestsRestoreCreateBody()
+ const FeatureRequestsRestoreCreateParams = orvalSchemas.FeatureRequestsRestoreCreateParams()
+ return FeatureRequestsRestoreCreateParams.omit({ project_id: true }).extend(FeatureRequestsRestoreCreateBody.shape)
+}
const featureRequestsRestoreCreate = (): ToolBase<
- typeof FeatureRequestsRestoreCreateSchema,
+ ReturnType<typeof FeatureRequestsRestoreCreateSchema>,
WithPostHogUrl<Schemas.FeatureRequest>
> => ({
name: 'feature-requests-restore-create',
- schema: FeatureRequestsRestoreCreateSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureRequestsRestoreCreateSchema>) => {
+ schema: FeatureRequestsRestoreCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureRequestsRestoreCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.expected_version !== undefined) {
@@ -1619,15 +1737,18 @@ const featureRequestsRestoreCreate = (): ToolBase<
},
})
-const FeatureRequestsRetrieveSchema = FeatureRequestsRetrieveParams.omit({ project_id: true })
+const FeatureRequestsRetrieveSchema = () => {
+ const FeatureRequestsRetrieveParams = orvalSchemas.FeatureRequestsRetrieveParams()
+ return FeatureRequestsRetrieveParams.omit({ project_id: true })
+}
const featureRequestsRetrieve = (): ToolBase<
- typeof FeatureRequestsRetrieveSchema,
+ ReturnType<typeof FeatureRequestsRetrieveSchema>,
WithPostHogUrl<Schemas.FeatureRequest>
> => ({
name: 'feature-requests-retrieve',
- schema: FeatureRequestsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureRequestsRetrieveSchema>) => {
+ schema: FeatureRequestsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureRequestsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.FeatureRequest>({
method: 'GET',
@@ -1637,15 +1758,18 @@ const featureRequestsRetrieve = (): ToolBase<
},
})
-const FeatureRequestsStatusHistoryListSchema = FeatureRequestsStatusHistoryListParams.omit({ project_id: true })
+const FeatureRequestsStatusHistoryListSchema = () => {
+ const FeatureRequestsStatusHistoryListParams = orvalSchemas.FeatureRequestsStatusHistoryListParams()
+ return FeatureRequestsStatusHistoryListParams.omit({ project_id: true })
+}
const featureRequestsStatusHistoryList = (): ToolBase<
- typeof FeatureRequestsStatusHistoryListSchema,
+ ReturnType<typeof FeatureRequestsStatusHistoryListSchema>,
WithPostHogUrl<Schemas.FeatureRequestStatusHistory[]>
> => ({
name: 'feature-requests-status-history-list',
- schema: FeatureRequestsStatusHistoryListSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureRequestsStatusHistoryListSchema>) => {
+ schema: FeatureRequestsStatusHistoryListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureRequestsStatusHistoryListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.FeatureRequestStatusHistory[]>({
method: 'GET',
@@ -1655,17 +1779,24 @@ const featureRequestsStatusHistoryList = (): ToolBase<
},
})
-const FeatureRequestsUpdateEvidenceCreateSchema = FeatureRequestsUpdateEvidenceCreateParams.omit({
- project_id: true,
-}).extend(FeatureRequestsUpdateEvidenceCreateBody.shape)
+const FeatureRequestsUpdateEvidenceCreateSchema = () => {
+ const FeatureRequestsUpdateEvidenceCreateBody = orvalSchemas.FeatureRequestsUpdateEvidenceCreateBody()
+ const FeatureRequestsUpdateEvidenceCreateParams = orvalSchemas.FeatureRequestsUpdateEvidenceCreateParams()
+ return FeatureRequestsUpdateEvidenceCreateParams.omit({ project_id: true }).extend(
+ FeatureRequestsUpdateEvidenceCreateBody.shape
+ )
+}
const featureRequestsUpdateEvidenceCreate = (): ToolBase<
- typeof FeatureRequestsUpdateEvidenceCreateSchema,
+ ReturnType<typeof FeatureRequestsUpdateEvidenceCreateSchema>,
WithPostHogUrl<Schemas.FeatureRequest>
> => ({
name: 'feature-requests-update-evidence-create',
- schema: FeatureRequestsUpdateEvidenceCreateSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureRequestsUpdateEvidenceCreateSchema>) => {
+ schema: FeatureRequestsUpdateEvidenceCreateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof FeatureRequestsUpdateEvidenceCreateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.summary !== undefined) {
@@ -1701,22 +1832,26 @@ const featureRequestsUpdateEvidenceCreate = (): ToolBase<
},
})
-const UsageMetricsCreateSchema = GroupsTypesMetricsCreateParams.omit({ project_id: true })
- .extend(GroupsTypesMetricsCreateBody.shape)
- .extend({
- group_type_index: GroupsTypesMetricsCreateParams.shape['group_type_index'].describe(
- 'Legacy URL parameter retained for backward compatibility. Pass `0`. The stored value does not scope the metric — usage metrics apply to both groups and persons regardless of this value.'
- ),
- filters: UsageMetricFiltersSchema,
- math_property: GroupsTypesMetricsCreateBody.shape['math_property'].describe(
- 'Required when `math` is `sum`; must be empty when `math` is `count`. For events metrics this is an event property name. For data warehouse metrics this is the column name (or HogQL expression) to sum on the DW table.'
- ),
- })
+const UsageMetricsCreateSchema = () => {
+ const GroupsTypesMetricsCreateBody = orvalSchemas.GroupsTypesMetricsCreateBody()
+ const GroupsTypesMetricsCreateParams = orvalSchemas.GroupsTypesMetricsCreateParams()
+ return GroupsTypesMetricsCreateParams.omit({ project_id: true })
+ .extend(GroupsTypesMetricsCreateBody.shape)
+ .extend({
+ group_type_index: GroupsTypesMetricsCreateParams.shape['group_type_index'].describe(
+ 'Legacy URL parameter retained for backward compatibility. Pass `0`. The stored value does not scope the metric — usage metrics apply to both groups and persons regardless of this value.'
+ ),
+ filters: UsageMetricFiltersSchema,
+ math_property: GroupsTypesMetricsCreateBody.shape['math_property'].describe(
+ 'Required when `math` is `sum`; must be empty when `math` is `count`. For events metrics this is an event property name. For data warehouse metrics this is the column name (or HogQL expression) to sum on the DW table.'
+ ),
+ })
+}
-const usageMetricsCreate = (): ToolBase<typeof UsageMetricsCreateSchema, Schemas.GroupUsageMetric> => ({
+const usageMetricsCreate = (): ToolBase<ReturnType<typeof UsageMetricsCreateSchema>, Schemas.GroupUsageMetric> => ({
name: 'usage-metrics-create',
- schema: UsageMetricsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof UsageMetricsCreateSchema>) => {
+ schema: UsageMetricsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UsageMetricsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -1749,16 +1884,19 @@ const usageMetricsCreate = (): ToolBase<typeof UsageMetricsCreateSchema, Schemas
},
})
-const UsageMetricsDestroySchema = GroupsTypesMetricsDestroyParams.omit({ project_id: true }).extend({
- group_type_index: GroupsTypesMetricsDestroyParams.shape['group_type_index'].describe(
- 'Legacy URL parameter retained for backward compatibility. Pass `0`. The stored value does not scope the metric — usage metrics apply to both groups and persons regardless of this value.'
- ),
-})
+const UsageMetricsDestroySchema = () => {
+ const GroupsTypesMetricsDestroyParams = orvalSchemas.GroupsTypesMetricsDestroyParams()
+ return GroupsTypesMetricsDestroyParams.omit({ project_id: true }).extend({
+ group_type_index: GroupsTypesMetricsDestroyParams.shape['group_type_index'].describe(
+ 'Legacy URL parameter retained for backward compatibility. Pass `0`. The stored value does not scope the metric — usage metrics apply to both groups and persons regardless of this value.'
+ ),
+ })
+}
-const usageMetricsDestroy = (): ToolBase<typeof UsageMetricsDestroySchema, unknown> => ({
+const usageMetricsDestroy = (): ToolBase<ReturnType<typeof UsageMetricsDestroySchema>, unknown> => ({
name: 'usage-metrics-destroy',
- schema: UsageMetricsDestroySchema,
- handler: async (context: Context, params: z.infer<typeof UsageMetricsDestroySchema>) => {
+ schema: UsageMetricsDestroySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UsageMetricsDestroySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -1768,21 +1906,25 @@ const usageMetricsDestroy = (): ToolBase<typeof UsageMetricsDestroySchema, unkno
},
})
-const UsageMetricsListSchema = GroupsTypesMetricsListParams.omit({ project_id: true })
- .extend(GroupsTypesMetricsListQueryParams.shape)
- .extend({
- group_type_index: GroupsTypesMetricsListParams.shape['group_type_index'].describe(
- 'Legacy URL parameter retained for backward compatibility. Pass `0`. The stored value does not scope the metric — usage metrics apply to both groups and persons regardless of this value.'
- ),
- })
+const UsageMetricsListSchema = () => {
+ const GroupsTypesMetricsListParams = orvalSchemas.GroupsTypesMetricsListParams()
+ const GroupsTypesMetricsListQueryParams = orvalSchemas.GroupsTypesMetricsListQueryParams()
+ return GroupsTypesMetricsListParams.omit({ project_id: true })
+ .extend(GroupsTypesMetricsListQueryParams.shape)
+ .extend({
+ group_type_index: GroupsTypesMetricsListParams.shape['group_type_index'].describe(
+ 'Legacy URL parameter retained for backward compatibility. Pass `0`. The stored value does not scope the metric — usage metrics apply to both groups and persons regardless of this value.'
+ ),
+ })
+}
const usageMetricsList = (): ToolBase<
- typeof UsageMetricsListSchema,
+ ReturnType<typeof UsageMetricsListSchema>,
WithPostHogUrl<Schemas.PaginatedGroupUsageMetricList>
> => ({
name: 'usage-metrics-list',
- schema: UsageMetricsListSchema,
- handler: async (context: Context, params: z.infer<typeof UsageMetricsListSchema>) => {
+ schema: UsageMetricsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UsageMetricsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedGroupUsageMetricList>({
method: 'GET',
@@ -1796,22 +1938,29 @@ const usageMetricsList = (): ToolBase<
},
})
-const UsageMetricsPartialUpdateSchema = GroupsTypesMetricsPartialUpdateParams.omit({ project_id: true })
- .extend(GroupsTypesMetricsPartialUpdateBody.shape)
- .extend({
- group_type_index: GroupsTypesMetricsPartialUpdateParams.shape['group_type_index'].describe(
- 'Legacy URL parameter retained for backward compatibility. Pass `0`. The stored value does not scope the metric — usage metrics apply to both groups and persons regardless of this value.'
- ),
- filters: UsageMetricFiltersSchema.optional(),
- math_property: GroupsTypesMetricsPartialUpdateBody.shape['math_property'].describe(
- 'Required when `math` is `sum`; must be empty when `math` is `count`. For events metrics this is an event property name. For data warehouse metrics this is the column name (or HogQL expression) to sum on the DW table.'
- ),
- })
+const UsageMetricsPartialUpdateSchema = () => {
+ const GroupsTypesMetricsPartialUpdateBody = orvalSchemas.GroupsTypesMetricsPartialUpdateBody()
+ const GroupsTypesMetricsPartialUpdateParams = orvalSchemas.GroupsTypesMetricsPartialUpdateParams()
+ return GroupsTypesMetricsPartialUpdateParams.omit({ project_id: true })
+ .extend(GroupsTypesMetricsPartialUpdateBody.shape)
+ .extend({
+ group_type_index: GroupsTypesMetricsPartialUpdateParams.shape['group_type_index'].describe(
+ 'Legacy URL parameter retained for backward compatibility. Pass `0`. The stored value does not scope the metric — usage metrics apply to both groups and persons regardless of this value.'
+ ),
+ filters: UsageMetricFiltersSchema.optional(),
+ math_property: GroupsTypesMetricsPartialUpdateBody.shape['math_property'].describe(
+ 'Required when `math` is `sum`; must be empty when `math` is `count`. For events metrics this is an event property name. For data warehouse metrics this is the column name (or HogQL expression) to sum on the DW table.'
+ ),
+ })
+}
-const usageMetricsPartialUpdate = (): ToolBase<typeof UsageMetricsPartialUpdateSchema, Schemas.GroupUsageMetric> => ({
+const usageMetricsPartialUpdate = (): ToolBase<
+ ReturnType<typeof UsageMetricsPartialUpdateSchema>,
+ Schemas.GroupUsageMetric
+> => ({
name: 'usage-metrics-partial-update',
- schema: UsageMetricsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof UsageMetricsPartialUpdateSchema>) => {
+ schema: UsageMetricsPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UsageMetricsPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -1844,16 +1993,19 @@ const usageMetricsPartialUpdate = (): ToolBase<typeof UsageMetricsPartialUpdateS
},
})
-const UsageMetricsRetrieveSchema = GroupsTypesMetricsRetrieveParams.omit({ project_id: true }).extend({
- group_type_index: GroupsTypesMetricsRetrieveParams.shape['group_type_index'].describe(
- 'Legacy URL parameter retained for backward compatibility. Pass `0`. The stored value does not scope the metric — usage metrics apply to both groups and persons regardless of this value.'
- ),
-})
+const UsageMetricsRetrieveSchema = () => {
+ const GroupsTypesMetricsRetrieveParams = orvalSchemas.GroupsTypesMetricsRetrieveParams()
+ return GroupsTypesMetricsRetrieveParams.omit({ project_id: true }).extend({
+ group_type_index: GroupsTypesMetricsRetrieveParams.shape['group_type_index'].describe(
+ 'Legacy URL parameter retained for backward compatibility. Pass `0`. The stored value does not scope the metric — usage metrics apply to both groups and persons regardless of this value.'
+ ),
+ })
+}
-const usageMetricsRetrieve = (): ToolBase<typeof UsageMetricsRetrieveSchema, Schemas.GroupUsageMetric> => ({
+const usageMetricsRetrieve = (): ToolBase<ReturnType<typeof UsageMetricsRetrieveSchema>, Schemas.GroupUsageMetric> => ({
name: 'usage-metrics-retrieve',
- schema: UsageMetricsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof UsageMetricsRetrieveSchema>) => {
+ schema: UsageMetricsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UsageMetricsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.GroupUsageMetric>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/dashboards.ts b/services/mcp/src/tools/generated/dashboards.ts
index 76aa743b4464..fe63f2b4c885 100644
--- a/services/mcp/src/tools/generated/dashboards.ts
+++ b/services/mcp/src/tools/generated/dashboards.ts
@@ -2,39 +2,7 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- DashboardTemplatesListQueryParams,
- DashboardTemplatesRetrieveParams,
- DashboardsCopyTileCreateBody,
- DashboardsCopyTileCreateParams,
- DashboardsCreateBody,
- DashboardsCreateQueryParams,
- DashboardsCreateTextTileCreateBody,
- DashboardsCreateTextTileCreateParams,
- DashboardsDeleteTileBody,
- DashboardsDeleteTileParams,
- DashboardsDestroyParams,
- DashboardsListQueryParams,
- DashboardsMoveTilePartialUpdateBody,
- DashboardsMoveTilePartialUpdateParams,
- DashboardsPartialUpdateBody,
- DashboardsPartialUpdateParams,
- DashboardsPartialUpdateQueryParams,
- DashboardsReorderTilesCreateBody,
- DashboardsReorderTilesCreateParams,
- DashboardsRetrieveParams,
- DashboardsRetrieveQueryParams,
- DashboardsRunInsightsRetrieveParams,
- DashboardsRunInsightsRetrieveQueryParams,
- DashboardsRunWidgetsRetrieveParams,
- DashboardsRunWidgetsRetrieveQueryParams,
- DashboardsUpdateTextTileCreateBody,
- DashboardsUpdateTextTileCreateParams,
- DashboardsUpdateWidgetsBatchBody,
- DashboardsUpdateWidgetsBatchParams,
- DashboardsWidgetsBatchCreateBody,
- DashboardsWidgetsBatchCreateParams,
-} from '@/generated/dashboards/api'
+import * as orvalSchemas from '@/generated/dashboards/api'
import { castStringToInt } from '@/tools/cast-helpers'
import {
withPostHogUrl,
@@ -47,15 +15,19 @@ import {
} from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const DashboardCreateSchema = DashboardsCreateQueryParams.omit({ format: true }).extend(DashboardsCreateBody.shape)
+const DashboardCreateSchema = () => {
+ const DashboardsCreateBody = orvalSchemas.DashboardsCreateBody()
+ const DashboardsCreateQueryParams = orvalSchemas.DashboardsCreateQueryParams()
+ return DashboardsCreateQueryParams.omit({ format: true }).extend(DashboardsCreateBody.shape)
+}
const dashboardCreate = (): ToolBase<
- typeof DashboardCreateSchema,
+ ReturnType<typeof DashboardCreateSchema>,
WithAgentNote<WithPostHogUrl<Schemas.Dashboard>>
> => ({
name: 'dashboard-create',
- schema: DashboardCreateSchema,
- handler: async (context: Context, params: z.infer<typeof DashboardCreateSchema>) => {
+ schema: DashboardCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DashboardCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -151,17 +123,21 @@ const dashboardCreate = (): ToolBase<
},
})
-const DashboardCreateTextTileSchema = DashboardsCreateTextTileCreateParams.omit({ project_id: true })
- .extend(DashboardsCreateTextTileCreateBody.shape)
- .extend({ id: z.preprocess(castStringToInt, DashboardsCreateTextTileCreateParams.shape['id']) })
+const DashboardCreateTextTileSchema = () => {
+ const DashboardsCreateTextTileCreateBody = orvalSchemas.DashboardsCreateTextTileCreateBody()
+ const DashboardsCreateTextTileCreateParams = orvalSchemas.DashboardsCreateTextTileCreateParams()
+ return DashboardsCreateTextTileCreateParams.omit({ project_id: true })
+ .extend(DashboardsCreateTextTileCreateBody.shape)
+ .extend({ id: z.preprocess(castStringToInt, DashboardsCreateTextTileCreateParams.shape['id']) })
+}
const dashboardCreateTextTile = (): ToolBase<
- typeof DashboardCreateTextTileSchema,
+ ReturnType<typeof DashboardCreateTextTileSchema>,
WithPostHogUrl<Schemas.DashboardTile>
> => ({
name: 'dashboard-create-text-tile',
- schema: DashboardCreateTextTileSchema,
- handler: async (context: Context, params: z.infer<typeof DashboardCreateTextTileSchema>) => {
+ schema: DashboardCreateTextTileSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DashboardCreateTextTileSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.body !== undefined) {
@@ -182,14 +158,17 @@ const dashboardCreateTextTile = (): ToolBase<
},
})
-const DashboardDeleteSchema = DashboardsDestroyParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, DashboardsDestroyParams.shape['id']),
-})
+const DashboardDeleteSchema = () => {
+ const DashboardsDestroyParams = orvalSchemas.DashboardsDestroyParams()
+ return DashboardsDestroyParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, DashboardsDestroyParams.shape['id']),
+ })
+}
-const dashboardDelete = (): ToolBase<typeof DashboardDeleteSchema, Schemas.Dashboard> => ({
+const dashboardDelete = (): ToolBase<ReturnType<typeof DashboardDeleteSchema>, Schemas.Dashboard> => ({
name: 'dashboard-delete',
- schema: DashboardDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof DashboardDeleteSchema>) => {
+ schema: DashboardDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DashboardDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Dashboard>({
method: 'PATCH',
@@ -200,14 +179,18 @@ const dashboardDelete = (): ToolBase<typeof DashboardDeleteSchema, Schemas.Dashb
},
})
-const DashboardDeleteTileSchema = DashboardsDeleteTileParams.omit({ project_id: true })
- .extend(DashboardsDeleteTileBody.shape)
- .extend({ id: z.preprocess(castStringToInt, DashboardsDeleteTileParams.shape['id']) })
+const DashboardDeleteTileSchema = () => {
+ const DashboardsDeleteTileBody = orvalSchemas.DashboardsDeleteTileBody()
+ const DashboardsDeleteTileParams = orvalSchemas.DashboardsDeleteTileParams()
+ return DashboardsDeleteTileParams.omit({ project_id: true })
+ .extend(DashboardsDeleteTileBody.shape)
+ .extend({ id: z.preprocess(castStringToInt, DashboardsDeleteTileParams.shape['id']) })
+}
-const dashboardDeleteTile = (): ToolBase<typeof DashboardDeleteTileSchema, unknown> => ({
+const dashboardDeleteTile = (): ToolBase<ReturnType<typeof DashboardDeleteTileSchema>, unknown> => ({
name: 'dashboard-delete-tile',
- schema: DashboardDeleteTileSchema,
- handler: async (context: Context, params: z.infer<typeof DashboardDeleteTileSchema>) => {
+ schema: DashboardDeleteTileSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DashboardDeleteTileSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.tile_id !== undefined) {
@@ -222,28 +205,32 @@ const dashboardDeleteTile = (): ToolBase<typeof DashboardDeleteTileSchema, unkno
},
})
-const DashboardGetSchema = DashboardsRetrieveParams.omit({ project_id: true })
- .extend(DashboardsRetrieveQueryParams.omit({ format: true }).shape)
- .extend({ id: z.preprocess(castStringToInt, DashboardsRetrieveParams.shape['id']) })
- .extend({
- filters_override: z
- .union([z.string(), z.record(z.string(), z.unknown())])
- .optional()
- .describe(
- 'Object (or pre-encoded JSON string) to override dashboard filters for this request only (not persisted). Top-level keys replace; nested values are not deep-merged — pass the complete value for any key you override. Accepts the same keys as the dashboard filters schema (e.g., `date_from`, `date_to`, `properties`). Ignored when accessed via a sharing token.'
- ),
- variables_override: z
- .union([z.string(), z.record(z.string(), z.unknown())])
- .optional()
- .describe(
- 'Object (or pre-encoded JSON string) to override dashboard variables for this request only (not persisted). Format: {"<variable_id>": {"code_name": "<code_name>", "variableId": "<variable_id>", "value": <new_value>}}. Each entry must include `code_name` — partial entries are silently dropped. The simplest workflow is to call `dashboard-get` first, copy the matching entry from the response, and mutate `value`. Top-level keys replace; nested values are not deep-merged. Ignored when accessed via a sharing token.'
- ),
- })
+const DashboardGetSchema = () => {
+ const DashboardsRetrieveParams = orvalSchemas.DashboardsRetrieveParams()
+ const DashboardsRetrieveQueryParams = orvalSchemas.DashboardsRetrieveQueryParams()
+ return DashboardsRetrieveParams.omit({ project_id: true })
+ .extend(DashboardsRetrieveQueryParams.omit({ format: true }).shape)
+ .extend({ id: z.preprocess(castStringToInt, DashboardsRetrieveParams.shape['id']) })
+ .extend({
+ filters_override: z
+ .union([z.string(), z.record(z.string(), z.unknown())])
+ .optional()
+ .describe(
+ 'Object (or pre-encoded JSON string) to override dashboard filters for this request only (not persisted). Top-level keys replace; nested values are not deep-merged — pass the complete value for any key you override. Accepts the same keys as the dashboard filters schema (e.g., `date_from`, `date_to`, `properties`). Ignored when accessed via a sharing token.'
+ ),
+ variables_override: z
+ .union([z.string(), z.record(z.string(), z.unknown())])
+ .optional()
+ .describe(
+ 'Object (or pre-encoded JSON string) to override dashboard variables for this request only (not persisted). Format: {"<variable_id>": {"code_name": "<code_name>", "variableId": "<variable_id>", "value": <new_value>}}. Each entry must include `code_name` — partial entries are silently dropped. The simplest workflow is to call `dashboard-get` first, copy the matching entry from the response, and mutate `value`. Top-level keys replace; nested values are not deep-merged. Ignored when accessed via a sharing token.'
+ ),
+ })
+}
-const dashboardGet = (): ToolBase<typeof DashboardGetSchema, WithPostHogUrl<Schemas.Dashboard>> => ({
+const dashboardGet = (): ToolBase<ReturnType<typeof DashboardGetSchema>, WithPostHogUrl<Schemas.Dashboard>> => ({
name: 'dashboard-get',
- schema: DashboardGetSchema,
- handler: async (context: Context, params: z.infer<typeof DashboardGetSchema>) => {
+ schema: DashboardGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DashboardGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Dashboard>({
method: 'GET',
@@ -295,31 +282,35 @@ const dashboardGet = (): ToolBase<typeof DashboardGetSchema, WithPostHogUrl<Sche
},
})
-const DashboardInsightsRunSchema = DashboardsRunInsightsRetrieveParams.omit({ project_id: true })
- .extend(DashboardsRunInsightsRetrieveQueryParams.omit({ format: true }).shape)
- .extend({ id: z.preprocess(castStringToInt, DashboardsRunInsightsRetrieveParams.shape['id']) })
- .extend({
- filters_override: z
- .union([z.string(), z.record(z.string(), z.unknown())])
- .optional()
- .describe(
- 'Object (or pre-encoded JSON string) to override dashboard filters for this request only (not persisted). Top-level keys replace; nested values are not deep-merged — pass the complete value for any key you override. Accepts the same keys as the dashboard filters schema (e.g., `date_from`, `date_to`, `properties`). Ignored when accessed via a sharing token.'
- ),
- variables_override: z
- .union([z.string(), z.record(z.string(), z.unknown())])
- .optional()
- .describe(
- 'Object (or pre-encoded JSON string) to override dashboard variables for this request only (not persisted). Format: {"<variable_id>": {"code_name": "<code_name>", "variableId": "<variable_id>", "value": <new_value>}}. Each entry must include `code_name` — partial entries are silently dropped. The simplest workflow is to call `dashboard-get` first, copy the matching entry from the response, and mutate `value`. Top-level keys replace; nested values are not deep-merged. Ignored when accessed via a sharing token.'
- ),
- })
+const DashboardInsightsRunSchema = () => {
+ const DashboardsRunInsightsRetrieveParams = orvalSchemas.DashboardsRunInsightsRetrieveParams()
+ const DashboardsRunInsightsRetrieveQueryParams = orvalSchemas.DashboardsRunInsightsRetrieveQueryParams()
+ return DashboardsRunInsightsRetrieveParams.omit({ project_id: true })
+ .extend(DashboardsRunInsightsRetrieveQueryParams.omit({ format: true }).shape)
+ .extend({ id: z.preprocess(castStringToInt, DashboardsRunInsightsRetrieveParams.shape['id']) })
+ .extend({
+ filters_override: z
+ .union([z.string(), z.record(z.string(), z.unknown())])
+ .optional()
+ .describe(
+ 'Object (or pre-encoded JSON string) to override dashboard filters for this request only (not persisted). Top-level keys replace; nested values are not deep-merged — pass the complete value for any key you override. Accepts the same keys as the dashboard filters schema (e.g., `date_from`, `date_to`, `properties`). Ignored when accessed via a sharing token.'
+ ),
+ variables_override: z
+ .union([z.string(), z.record(z.string(), z.unknown())])
+ .optional()
+ .describe(
+ 'Object (or pre-encoded JSON string) to override dashboard variables for this request only (not persisted). Format: {"<variable_id>": {"code_name": "<code_name>", "variableId": "<variable_id>", "value": <new_value>}}. Each entry must include `code_name` — partial entries are silently dropped. The simplest workflow is to call `dashboard-get` first, copy the matching entry from the response, and mutate `value`. Top-level keys replace; nested values are not deep-merged. Ignored when accessed via a sharing token.'
+ ),
+ })
+}
const dashboardInsightsRun = (): ToolBase<
- typeof DashboardInsightsRunSchema,
+ ReturnType<typeof DashboardInsightsRunSchema>,
WithPostHogUrl<Schemas.RunInsightsResponse>
> => ({
name: 'dashboard-insights-run',
- schema: DashboardInsightsRunSchema,
- handler: async (context: Context, params: z.infer<typeof DashboardInsightsRunSchema>) => {
+ schema: DashboardInsightsRunSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DashboardInsightsRunSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.RunInsightsResponse>({
method: 'GET',
@@ -335,14 +326,19 @@ const dashboardInsightsRun = (): ToolBase<
},
})
-const DashboardReorderTilesSchema = DashboardsReorderTilesCreateParams.omit({ project_id: true }).extend(
- DashboardsReorderTilesCreateBody.shape
-)
+const DashboardReorderTilesSchema = () => {
+ const DashboardsReorderTilesCreateBody = orvalSchemas.DashboardsReorderTilesCreateBody()
+ const DashboardsReorderTilesCreateParams = orvalSchemas.DashboardsReorderTilesCreateParams()
+ return DashboardsReorderTilesCreateParams.omit({ project_id: true }).extend(DashboardsReorderTilesCreateBody.shape)
+}
-const dashboardReorderTiles = (): ToolBase<typeof DashboardReorderTilesSchema, WithPostHogUrl<Schemas.Dashboard>> => ({
+const dashboardReorderTiles = (): ToolBase<
+ ReturnType<typeof DashboardReorderTilesSchema>,
+ WithPostHogUrl<Schemas.Dashboard>
+> => ({
name: 'dashboard-reorder-tiles',
- schema: DashboardReorderTilesSchema,
- handler: async (context: Context, params: z.infer<typeof DashboardReorderTilesSchema>) => {
+ schema: DashboardReorderTilesSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DashboardReorderTilesSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.tile_order !== undefined) {
@@ -360,15 +356,18 @@ const dashboardReorderTiles = (): ToolBase<typeof DashboardReorderTilesSchema, W
},
})
-const DashboardTemplatesListSchema = DashboardTemplatesListQueryParams
+const DashboardTemplatesListSchema = () => {
+ const DashboardTemplatesListQueryParams = orvalSchemas.DashboardTemplatesListQueryParams()
+ return DashboardTemplatesListQueryParams
+}
const dashboardTemplatesList = (): ToolBase<
- typeof DashboardTemplatesListSchema,
+ ReturnType<typeof DashboardTemplatesListSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.PaginatedDashboardTemplateList>>
> => ({
name: 'dashboard-templates-list',
- schema: DashboardTemplatesListSchema,
- handler: async (context: Context, params: z.infer<typeof DashboardTemplatesListSchema>) => {
+ schema: DashboardTemplatesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DashboardTemplatesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedDashboardTemplateList>({
method: 'GET',
@@ -402,15 +401,18 @@ const dashboardTemplatesList = (): ToolBase<
},
})
-const DashboardTemplatesRetrieveSchema = DashboardTemplatesRetrieveParams.omit({ project_id: true })
+const DashboardTemplatesRetrieveSchema = () => {
+ const DashboardTemplatesRetrieveParams = orvalSchemas.DashboardTemplatesRetrieveParams()
+ return DashboardTemplatesRetrieveParams.omit({ project_id: true })
+}
const dashboardTemplatesRetrieve = (): ToolBase<
- typeof DashboardTemplatesRetrieveSchema,
+ ReturnType<typeof DashboardTemplatesRetrieveSchema>,
WithInformationalResponse<Schemas.DashboardTemplate>
> => ({
name: 'dashboard-templates-retrieve',
- schema: DashboardTemplatesRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof DashboardTemplatesRetrieveSchema>) => {
+ schema: DashboardTemplatesRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DashboardTemplatesRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.DashboardTemplate>({
method: 'GET',
@@ -424,14 +426,21 @@ const dashboardTemplatesRetrieve = (): ToolBase<
},
})
-const DashboardTileCopySchema = DashboardsCopyTileCreateParams.omit({ project_id: true })
- .extend(DashboardsCopyTileCreateBody.shape)
- .extend({ id: z.preprocess(castStringToInt, DashboardsCopyTileCreateParams.shape['id']) })
+const DashboardTileCopySchema = () => {
+ const DashboardsCopyTileCreateBody = orvalSchemas.DashboardsCopyTileCreateBody()
+ const DashboardsCopyTileCreateParams = orvalSchemas.DashboardsCopyTileCreateParams()
+ return DashboardsCopyTileCreateParams.omit({ project_id: true })
+ .extend(DashboardsCopyTileCreateBody.shape)
+ .extend({ id: z.preprocess(castStringToInt, DashboardsCopyTileCreateParams.shape['id']) })
+}
-const dashboardTileCopy = (): ToolBase<typeof DashboardTileCopySchema, WithPostHogUrl<Schemas.Dashboard>> => ({
+const dashboardTileCopy = (): ToolBase<
+ ReturnType<typeof DashboardTileCopySchema>,
+ WithPostHogUrl<Schemas.Dashboard>
+> => ({
name: 'dashboard-tile-copy',
- schema: DashboardTileCopySchema,
- handler: async (context: Context, params: z.infer<typeof DashboardTileCopySchema>) => {
+ schema: DashboardTileCopySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DashboardTileCopySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.fromDashboardId !== undefined) {
@@ -449,15 +458,20 @@ const dashboardTileCopy = (): ToolBase<typeof DashboardTileCopySchema, WithPostH
},
})
-const DashboardUpdateSchema = DashboardsPartialUpdateParams.omit({ project_id: true })
- .extend(DashboardsPartialUpdateQueryParams.omit({ format: true }).shape)
- .extend(DashboardsPartialUpdateBody.shape)
- .extend({ id: z.preprocess(castStringToInt, DashboardsPartialUpdateParams.shape['id']) })
+const DashboardUpdateSchema = () => {
+ const DashboardsPartialUpdateBody = orvalSchemas.DashboardsPartialUpdateBody()
+ const DashboardsPartialUpdateParams = orvalSchemas.DashboardsPartialUpdateParams()
+ const DashboardsPartialUpdateQueryParams = orvalSchemas.DashboardsPartialUpdateQueryParams()
+ return DashboardsPartialUpdateParams.omit({ project_id: true })
+ .extend(DashboardsPartialUpdateQueryParams.omit({ format: true }).shape)
+ .extend(DashboardsPartialUpdateBody.shape)
+ .extend({ id: z.preprocess(castStringToInt, DashboardsPartialUpdateParams.shape['id']) })
+}
-const dashboardUpdate = (): ToolBase<typeof DashboardUpdateSchema, WithPostHogUrl<Schemas.Dashboard>> => ({
+const dashboardUpdate = (): ToolBase<ReturnType<typeof DashboardUpdateSchema>, WithPostHogUrl<Schemas.Dashboard>> => ({
name: 'dashboard-update',
- schema: DashboardUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof DashboardUpdateSchema>) => {
+ schema: DashboardUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DashboardUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -554,17 +568,21 @@ const dashboardUpdate = (): ToolBase<typeof DashboardUpdateSchema, WithPostHogUr
},
})
-const DashboardUpdateTextTileSchema = DashboardsUpdateTextTileCreateParams.omit({ project_id: true })
- .extend(DashboardsUpdateTextTileCreateBody.shape)
- .extend({ id: z.preprocess(castStringToInt, DashboardsUpdateTextTileCreateParams.shape['id']) })
+const DashboardUpdateTextTileSchema = () => {
+ const DashboardsUpdateTextTileCreateBody = orvalSchemas.DashboardsUpdateTextTileCreateBody()
+ const DashboardsUpdateTextTileCreateParams = orvalSchemas.DashboardsUpdateTextTileCreateParams()
+ return DashboardsUpdateTextTileCreateParams.omit({ project_id: true })
+ .extend(DashboardsUpdateTextTileCreateBody.shape)
+ .extend({ id: z.preprocess(castStringToInt, DashboardsUpdateTextTileCreateParams.shape['id']) })
+}
const dashboardUpdateTextTile = (): ToolBase<
- typeof DashboardUpdateTextTileSchema,
+ ReturnType<typeof DashboardUpdateTextTileSchema>,
WithPostHogUrl<Schemas.DashboardTile>
> => ({
name: 'dashboard-update-text-tile',
- schema: DashboardUpdateTextTileSchema,
- handler: async (context: Context, params: z.infer<typeof DashboardUpdateTextTileSchema>) => {
+ schema: DashboardUpdateTextTileSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DashboardUpdateTextTileSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.tile_id !== undefined) {
@@ -588,16 +606,15 @@ const dashboardUpdateTextTile = (): ToolBase<
},
})
-const DashboardWidgetCatalogListSchema = z.object({})
+const DashboardWidgetCatalogListSchema = () => z.object({})
const dashboardWidgetCatalogList = (): ToolBase<
- typeof DashboardWidgetCatalogListSchema,
+ ReturnType<typeof DashboardWidgetCatalogListSchema>,
Schemas.WidgetCatalogResponse
> => ({
name: 'dashboard-widget-catalog-list',
- schema: DashboardWidgetCatalogListSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof DashboardWidgetCatalogListSchema>) => {
+ schema: DashboardWidgetCatalogListSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof DashboardWidgetCatalogListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.WidgetCatalogResponse>({
method: 'GET',
@@ -607,17 +624,21 @@ const dashboardWidgetCatalogList = (): ToolBase<
},
})
-const DashboardWidgetsBatchAddSchema = DashboardsWidgetsBatchCreateParams.omit({ project_id: true })
- .extend(DashboardsWidgetsBatchCreateBody.shape)
- .extend({ id: z.preprocess(castStringToInt, DashboardsWidgetsBatchCreateParams.shape['id']) })
+const DashboardWidgetsBatchAddSchema = () => {
+ const DashboardsWidgetsBatchCreateBody = orvalSchemas.DashboardsWidgetsBatchCreateBody()
+ const DashboardsWidgetsBatchCreateParams = orvalSchemas.DashboardsWidgetsBatchCreateParams()
+ return DashboardsWidgetsBatchCreateParams.omit({ project_id: true })
+ .extend(DashboardsWidgetsBatchCreateBody.shape)
+ .extend({ id: z.preprocess(castStringToInt, DashboardsWidgetsBatchCreateParams.shape['id']) })
+}
const dashboardWidgetsBatchAdd = (): ToolBase<
- typeof DashboardWidgetsBatchAddSchema,
+ ReturnType<typeof DashboardWidgetsBatchAddSchema>,
WithPostHogUrl<Schemas.AddDashboardWidgetsBatchResponse>
> => ({
name: 'dashboard-widgets-batch-add',
- schema: DashboardWidgetsBatchAddSchema,
- handler: async (context: Context, params: z.infer<typeof DashboardWidgetsBatchAddSchema>) => {
+ schema: DashboardWidgetsBatchAddSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DashboardWidgetsBatchAddSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.widgets !== undefined) {
@@ -632,17 +653,21 @@ const dashboardWidgetsBatchAdd = (): ToolBase<
},
})
-const DashboardWidgetsBatchUpdateSchema = DashboardsUpdateWidgetsBatchParams.omit({ project_id: true })
- .extend(DashboardsUpdateWidgetsBatchBody.shape)
- .extend({ id: z.preprocess(castStringToInt, DashboardsUpdateWidgetsBatchParams.shape['id']) })
+const DashboardWidgetsBatchUpdateSchema = () => {
+ const DashboardsUpdateWidgetsBatchBody = orvalSchemas.DashboardsUpdateWidgetsBatchBody()
+ const DashboardsUpdateWidgetsBatchParams = orvalSchemas.DashboardsUpdateWidgetsBatchParams()
+ return DashboardsUpdateWidgetsBatchParams.omit({ project_id: true })
+ .extend(DashboardsUpdateWidgetsBatchBody.shape)
+ .extend({ id: z.preprocess(castStringToInt, DashboardsUpdateWidgetsBatchParams.shape['id']) })
+}
const dashboardWidgetsBatchUpdate = (): ToolBase<
- typeof DashboardWidgetsBatchUpdateSchema,
+ ReturnType<typeof DashboardWidgetsBatchUpdateSchema>,
WithPostHogUrl<Schemas.UpdateDashboardWidgetsBatchResponse>
> => ({
name: 'dashboard-widgets-batch-update',
- schema: DashboardWidgetsBatchUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof DashboardWidgetsBatchUpdateSchema>) => {
+ schema: DashboardWidgetsBatchUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DashboardWidgetsBatchUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.widgets !== undefined) {
@@ -657,17 +682,21 @@ const dashboardWidgetsBatchUpdate = (): ToolBase<
},
})
-const DashboardWidgetsRunSchema = DashboardsRunWidgetsRetrieveParams.omit({ project_id: true })
- .extend(DashboardsRunWidgetsRetrieveQueryParams.omit({ format: true }).shape)
- .extend({ id: z.preprocess(castStringToInt, DashboardsRunWidgetsRetrieveParams.shape['id']) })
+const DashboardWidgetsRunSchema = () => {
+ const DashboardsRunWidgetsRetrieveParams = orvalSchemas.DashboardsRunWidgetsRetrieveParams()
+ const DashboardsRunWidgetsRetrieveQueryParams = orvalSchemas.DashboardsRunWidgetsRetrieveQueryParams()
+ return DashboardsRunWidgetsRetrieveParams.omit({ project_id: true })
+ .extend(DashboardsRunWidgetsRetrieveQueryParams.omit({ format: true }).shape)
+ .extend({ id: z.preprocess(castStringToInt, DashboardsRunWidgetsRetrieveParams.shape['id']) })
+}
const dashboardWidgetsRun = (): ToolBase<
- typeof DashboardWidgetsRunSchema,
+ ReturnType<typeof DashboardWidgetsRunSchema>,
WithPostHogUrl<Schemas.RunWidgetsResponse>
> => ({
name: 'dashboard-widgets-run',
- schema: DashboardWidgetsRunSchema,
- handler: async (context: Context, params: z.infer<typeof DashboardWidgetsRunSchema>) => {
+ schema: DashboardWidgetsRunSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DashboardWidgetsRunSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.RunWidgetsResponse>({
method: 'GET',
@@ -680,18 +709,21 @@ const dashboardWidgetsRun = (): ToolBase<
},
})
-const DashboardsGetAllSchema = DashboardsListQueryParams.omit({ format: true }).extend({
- limit: z.preprocess(castStringToInt, DashboardsListQueryParams.shape['limit']).optional(),
- offset: z.preprocess(castStringToInt, DashboardsListQueryParams.shape['offset']).optional(),
-})
+const DashboardsGetAllSchema = () => {
+ const DashboardsListQueryParams = orvalSchemas.DashboardsListQueryParams()
+ return DashboardsListQueryParams.omit({ format: true }).extend({
+ limit: z.preprocess(castStringToInt, DashboardsListQueryParams.shape['limit']).optional(),
+ offset: z.preprocess(castStringToInt, DashboardsListQueryParams.shape['offset']).optional(),
+ })
+}
const dashboardsGetAll = (): ToolBase<
- typeof DashboardsGetAllSchema,
+ ReturnType<typeof DashboardsGetAllSchema>,
WithPostHogUrl<Schemas.PaginatedDashboardBasicList>
> => ({
name: 'dashboards-get-all',
- schema: DashboardsGetAllSchema,
- handler: async (context: Context, params: z.infer<typeof DashboardsGetAllSchema>) => {
+ schema: DashboardsGetAllSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DashboardsGetAllSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedDashboardBasicList>({
method: 'GET',
@@ -716,17 +748,21 @@ const dashboardsGetAll = (): ToolBase<
},
})
-const DashboardsMoveTilePartialUpdateSchema = DashboardsMoveTilePartialUpdateParams.omit({ project_id: true })
- .extend(DashboardsMoveTilePartialUpdateBody.shape)
- .extend({ id: z.preprocess(castStringToInt, DashboardsMoveTilePartialUpdateParams.shape['id']) })
+const DashboardsMoveTilePartialUpdateSchema = () => {
+ const DashboardsMoveTilePartialUpdateBody = orvalSchemas.DashboardsMoveTilePartialUpdateBody()
+ const DashboardsMoveTilePartialUpdateParams = orvalSchemas.DashboardsMoveTilePartialUpdateParams()
+ return DashboardsMoveTilePartialUpdateParams.omit({ project_id: true })
+ .extend(DashboardsMoveTilePartialUpdateBody.shape)
+ .extend({ id: z.preprocess(castStringToInt, DashboardsMoveTilePartialUpdateParams.shape['id']) })
+}
const dashboardsMoveTilePartialUpdate = (): ToolBase<
- typeof DashboardsMoveTilePartialUpdateSchema,
+ ReturnType<typeof DashboardsMoveTilePartialUpdateSchema>,
WithPostHogUrl<Schemas.Dashboard>
> => ({
name: 'dashboards-move-tile-partial-update',
- schema: DashboardsMoveTilePartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof DashboardsMoveTilePartialUpdateSchema>) => {
+ schema: DashboardsMoveTilePartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DashboardsMoveTilePartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.to_dashboard !== undefined) {
diff --git a/services/mcp/src/tools/generated/data_catalog.ts b/services/mcp/src/tools/generated/data_catalog.ts
index 206ff65c6b83..0ba241a19cac 100644
--- a/services/mcp/src/tools/generated/data_catalog.ts
+++ b/services/mcp/src/tools/generated/data_catalog.ts
@@ -2,23 +2,7 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- DataCatalogCertificationsCertifyCreateParams,
- DataCatalogCertificationsCreateBody,
- DataCatalogCertificationsDeprecateCreateParams,
- DataCatalogMetricsApproveCreateParams,
- DataCatalogMetricsCreateBody,
- DataCatalogMetricsPartialUpdateBody,
- DataCatalogMetricsPartialUpdateParams,
- DataCatalogMetricsRefreshFromInsightCreateParams,
- DataCatalogMetricsRunCreateBody,
- DataCatalogMetricsRunCreateParams,
- DataCatalogMetricsRunCreateQueryParams,
- DataCatalogRelationshipProposalsAcceptCreateParams,
- DataCatalogRelationshipProposalsCreateBody,
- DataCatalogRelationshipProposalsRejectCreateBody,
- DataCatalogRelationshipProposalsRejectCreateParams,
-} from '@/generated/data_catalog/api'
+import * as orvalSchemas from '@/generated/data_catalog/api'
import { getConfirmedActionRuntime } from '@/tools/confirmed-action-registry'
import {
executeConfirmedAction,
@@ -27,13 +11,14 @@ import {
} from '@/tools/confirmed-action-runtime'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const DataCatalogCertificationCertifySchema = DataCatalogCertificationsCertifyCreateParams.omit({
- project_id: true,
-}).extend({
- id: DataCatalogCertificationsCertifyCreateParams.shape['id'].describe(
- 'Certification id returned by data-catalog-certification-propose (a certification UUID — not a warehouse table or view id).'
- ),
-})
+const DataCatalogCertificationCertifySchema = () => {
+ const DataCatalogCertificationsCertifyCreateParams = orvalSchemas.DataCatalogCertificationsCertifyCreateParams()
+ return DataCatalogCertificationsCertifyCreateParams.omit({ project_id: true }).extend({
+ id: DataCatalogCertificationsCertifyCreateParams.shape['id'].describe(
+ 'Certification id returned by data-catalog-certification-propose (a certification UUID — not a warehouse table or view id).'
+ ),
+ })
+}
const DataCatalogCertificationCertifySchemaExecute = z.strictObject({
confirmation_hash: z
@@ -43,12 +28,12 @@ const DataCatalogCertificationCertifySchemaExecute = z.strictObject({
})
const dataCatalogCertificationCertifyPrepare = (): ToolBase<
- typeof DataCatalogCertificationCertifySchema,
+ ReturnType<typeof DataCatalogCertificationCertifySchema>,
PrepareConfirmedActionResult
> => ({
name: 'data-catalog-certification-certify-prepare',
- schema: DataCatalogCertificationCertifySchema,
- handler: async (context: Context, params: z.infer<typeof DataCatalogCertificationCertifySchema>) => {
+ schema: DataCatalogCertificationCertifySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataCatalogCertificationCertifySchema>>) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
return await prepareConfirmedAction(context, {
@@ -76,14 +61,17 @@ const dataCatalogCertificationCertifyExecute = (): ToolBase<
) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
- const __guard = await executeConfirmedAction<z.infer<typeof DataCatalogCertificationCertifySchema>>(context, {
- incomingArgs: confirmationParams,
- purpose: 'data-catalog-certification-certify',
- codec: __runtime.codec,
- ledger: __runtime.ledger,
- stash: __runtime.stash,
- expectedScope: { projectId: String(__scopeProjectId) },
- })
+ const __guard = await executeConfirmedAction<z.infer<ReturnType<typeof DataCatalogCertificationCertifySchema>>>(
+ context,
+ {
+ incomingArgs: confirmationParams,
+ purpose: 'data-catalog-certification-certify',
+ codec: __runtime.codec,
+ ledger: __runtime.ledger,
+ stash: __runtime.stash,
+ expectedScope: { projectId: String(__scopeProjectId) },
+ }
+ )
if (!__guard.ok) {
return __guard.result as never
}
@@ -97,13 +85,14 @@ const dataCatalogCertificationCertifyExecute = (): ToolBase<
},
})
-const DataCatalogCertificationDeprecateSchema = DataCatalogCertificationsDeprecateCreateParams.omit({
- project_id: true,
-}).extend({
- id: DataCatalogCertificationsDeprecateCreateParams.shape['id'].describe(
- 'Certification id returned by data-catalog-certification-propose (a certification UUID — not a warehouse table or view id).'
- ),
-})
+const DataCatalogCertificationDeprecateSchema = () => {
+ const DataCatalogCertificationsDeprecateCreateParams = orvalSchemas.DataCatalogCertificationsDeprecateCreateParams()
+ return DataCatalogCertificationsDeprecateCreateParams.omit({ project_id: true }).extend({
+ id: DataCatalogCertificationsDeprecateCreateParams.shape['id'].describe(
+ 'Certification id returned by data-catalog-certification-propose (a certification UUID — not a warehouse table or view id).'
+ ),
+ })
+}
const DataCatalogCertificationDeprecateSchemaExecute = z.strictObject({
confirmation_hash: z
@@ -113,12 +102,12 @@ const DataCatalogCertificationDeprecateSchemaExecute = z.strictObject({
})
const dataCatalogCertificationDeprecatePrepare = (): ToolBase<
- typeof DataCatalogCertificationDeprecateSchema,
+ ReturnType<typeof DataCatalogCertificationDeprecateSchema>,
PrepareConfirmedActionResult
> => ({
name: 'data-catalog-certification-deprecate-prepare',
- schema: DataCatalogCertificationDeprecateSchema,
- handler: async (context: Context, params: z.infer<typeof DataCatalogCertificationDeprecateSchema>) => {
+ schema: DataCatalogCertificationDeprecateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataCatalogCertificationDeprecateSchema>>) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
return await prepareConfirmedAction(context, {
@@ -146,7 +135,9 @@ const dataCatalogCertificationDeprecateExecute = (): ToolBase<
) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
- const __guard = await executeConfirmedAction<z.infer<typeof DataCatalogCertificationDeprecateSchema>>(context, {
+ const __guard = await executeConfirmedAction<
+ z.infer<ReturnType<typeof DataCatalogCertificationDeprecateSchema>>
+ >(context, {
incomingArgs: confirmationParams,
purpose: 'data-catalog-certification-deprecate',
codec: __runtime.codec,
@@ -167,15 +158,18 @@ const dataCatalogCertificationDeprecateExecute = (): ToolBase<
},
})
-const DataCatalogCertificationProposeSchema = DataCatalogCertificationsCreateBody
+const DataCatalogCertificationProposeSchema = () => {
+ const DataCatalogCertificationsCreateBody = orvalSchemas.DataCatalogCertificationsCreateBody()
+ return DataCatalogCertificationsCreateBody
+}
const dataCatalogCertificationPropose = (): ToolBase<
- typeof DataCatalogCertificationProposeSchema,
+ ReturnType<typeof DataCatalogCertificationProposeSchema>,
Schemas.DataCatalogCertification
> => ({
name: 'data-catalog-certification-propose',
- schema: DataCatalogCertificationProposeSchema,
- handler: async (context: Context, params: z.infer<typeof DataCatalogCertificationProposeSchema>) => {
+ schema: DataCatalogCertificationProposeSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataCatalogCertificationProposeSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.table_id !== undefined) {
@@ -205,7 +199,10 @@ const dataCatalogCertificationPropose = (): ToolBase<
},
})
-const DataCatalogMetricApproveSchema = DataCatalogMetricsApproveCreateParams.omit({ project_id: true })
+const DataCatalogMetricApproveSchema = () => {
+ const DataCatalogMetricsApproveCreateParams = orvalSchemas.DataCatalogMetricsApproveCreateParams()
+ return DataCatalogMetricsApproveCreateParams.omit({ project_id: true })
+}
const DataCatalogMetricApproveSchemaExecute = z.strictObject({
confirmation_hash: z
@@ -215,12 +212,12 @@ const DataCatalogMetricApproveSchemaExecute = z.strictObject({
})
const dataCatalogMetricApprovePrepare = (): ToolBase<
- typeof DataCatalogMetricApproveSchema,
+ ReturnType<typeof DataCatalogMetricApproveSchema>,
PrepareConfirmedActionResult
> => ({
name: 'data-catalog-metric-approve-prepare',
- schema: DataCatalogMetricApproveSchema,
- handler: async (context: Context, params: z.infer<typeof DataCatalogMetricApproveSchema>) => {
+ schema: DataCatalogMetricApproveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataCatalogMetricApproveSchema>>) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
return await prepareConfirmedAction(context, {
@@ -245,14 +242,17 @@ const dataCatalogMetricApproveExecute = (): ToolBase<
handler: async (context: Context, confirmationParams: z.infer<typeof DataCatalogMetricApproveSchemaExecute>) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
- const __guard = await executeConfirmedAction<z.infer<typeof DataCatalogMetricApproveSchema>>(context, {
- incomingArgs: confirmationParams,
- purpose: 'data-catalog-metric-approve',
- codec: __runtime.codec,
- ledger: __runtime.ledger,
- stash: __runtime.stash,
- expectedScope: { projectId: String(__scopeProjectId) },
- })
+ const __guard = await executeConfirmedAction<z.infer<ReturnType<typeof DataCatalogMetricApproveSchema>>>(
+ context,
+ {
+ incomingArgs: confirmationParams,
+ purpose: 'data-catalog-metric-approve',
+ codec: __runtime.codec,
+ ledger: __runtime.ledger,
+ stash: __runtime.stash,
+ expectedScope: { projectId: String(__scopeProjectId) },
+ }
+ )
if (!__guard.ok) {
return __guard.result as never
}
@@ -266,12 +266,18 @@ const dataCatalogMetricApproveExecute = (): ToolBase<
},
})
-const DataCatalogMetricCreateSchema = DataCatalogMetricsCreateBody
+const DataCatalogMetricCreateSchema = () => {
+ const DataCatalogMetricsCreateBody = orvalSchemas.DataCatalogMetricsCreateBody()
+ return DataCatalogMetricsCreateBody
+}
-const dataCatalogMetricCreate = (): ToolBase<typeof DataCatalogMetricCreateSchema, Schemas.DataCatalogMetric> => ({
+const dataCatalogMetricCreate = (): ToolBase<
+ ReturnType<typeof DataCatalogMetricCreateSchema>,
+ Schemas.DataCatalogMetric
+> => ({
name: 'data-catalog-metric-create',
- schema: DataCatalogMetricCreateSchema,
- handler: async (context: Context, params: z.infer<typeof DataCatalogMetricCreateSchema>) => {
+ schema: DataCatalogMetricCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataCatalogMetricCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -311,14 +317,22 @@ const dataCatalogMetricCreate = (): ToolBase<typeof DataCatalogMetricCreateSchem
},
})
-const DataCatalogMetricRunSchema = DataCatalogMetricsRunCreateParams.omit({ project_id: true })
- .extend(DataCatalogMetricsRunCreateQueryParams.shape)
- .extend(DataCatalogMetricsRunCreateBody.shape)
+const DataCatalogMetricRunSchema = () => {
+ const DataCatalogMetricsRunCreateBody = orvalSchemas.DataCatalogMetricsRunCreateBody()
+ const DataCatalogMetricsRunCreateParams = orvalSchemas.DataCatalogMetricsRunCreateParams()
+ const DataCatalogMetricsRunCreateQueryParams = orvalSchemas.DataCatalogMetricsRunCreateQueryParams()
+ return DataCatalogMetricsRunCreateParams.omit({ project_id: true })
+ .extend(DataCatalogMetricsRunCreateQueryParams.shape)
+ .extend(DataCatalogMetricsRunCreateBody.shape)
+}
-const dataCatalogMetricRun = (): ToolBase<typeof DataCatalogMetricRunSchema, Schemas.DataCatalogMetricRun> => ({
+const dataCatalogMetricRun = (): ToolBase<
+ ReturnType<typeof DataCatalogMetricRunSchema>,
+ Schemas.DataCatalogMetricRun
+> => ({
name: 'data-catalog-metric-run',
- schema: DataCatalogMetricRunSchema,
- handler: async (context: Context, params: z.infer<typeof DataCatalogMetricRunSchema>) => {
+ schema: DataCatalogMetricRunSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataCatalogMetricRunSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.date_from !== undefined) {
@@ -345,14 +359,21 @@ const dataCatalogMetricRun = (): ToolBase<typeof DataCatalogMetricRunSchema, Sch
},
})
-const DataCatalogMetricUpdateSchema = DataCatalogMetricsPartialUpdateParams.omit({ project_id: true })
- .extend(DataCatalogMetricsPartialUpdateBody.omit({ name: true }).shape)
- .extend({ new_name: DataCatalogMetricsPartialUpdateBody.shape['name'] })
+const DataCatalogMetricUpdateSchema = () => {
+ const DataCatalogMetricsPartialUpdateBody = orvalSchemas.DataCatalogMetricsPartialUpdateBody()
+ const DataCatalogMetricsPartialUpdateParams = orvalSchemas.DataCatalogMetricsPartialUpdateParams()
+ return DataCatalogMetricsPartialUpdateParams.omit({ project_id: true })
+ .extend(DataCatalogMetricsPartialUpdateBody.omit({ name: true }).shape)
+ .extend({ new_name: DataCatalogMetricsPartialUpdateBody.shape['name'] })
+}
-const dataCatalogMetricUpdate = (): ToolBase<typeof DataCatalogMetricUpdateSchema, Schemas.DataCatalogMetric> => ({
+const dataCatalogMetricUpdate = (): ToolBase<
+ ReturnType<typeof DataCatalogMetricUpdateSchema>,
+ Schemas.DataCatalogMetric
+> => ({
name: 'data-catalog-metric-update',
- schema: DataCatalogMetricUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof DataCatalogMetricUpdateSchema>) => {
+ schema: DataCatalogMetricUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataCatalogMetricUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.new_name !== undefined) {
@@ -392,17 +413,22 @@ const dataCatalogMetricUpdate = (): ToolBase<typeof DataCatalogMetricUpdateSchem
},
})
-const DataCatalogMetricsRefreshFromInsightCreateSchema = DataCatalogMetricsRefreshFromInsightCreateParams.omit({
- project_id: true,
-})
+const DataCatalogMetricsRefreshFromInsightCreateSchema = () => {
+ const DataCatalogMetricsRefreshFromInsightCreateParams =
+ orvalSchemas.DataCatalogMetricsRefreshFromInsightCreateParams()
+ return DataCatalogMetricsRefreshFromInsightCreateParams.omit({ project_id: true })
+}
const dataCatalogMetricsRefreshFromInsightCreate = (): ToolBase<
- typeof DataCatalogMetricsRefreshFromInsightCreateSchema,
+ ReturnType<typeof DataCatalogMetricsRefreshFromInsightCreateSchema>,
Schemas.DataCatalogMetric
> => ({
name: 'data-catalog-metrics-refresh-from-insight-create',
- schema: DataCatalogMetricsRefreshFromInsightCreateSchema,
- handler: async (context: Context, params: z.infer<typeof DataCatalogMetricsRefreshFromInsightCreateSchema>) => {
+ schema: DataCatalogMetricsRefreshFromInsightCreateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof DataCatalogMetricsRefreshFromInsightCreateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.DataCatalogMetric>({
method: 'POST',
@@ -412,9 +438,11 @@ const dataCatalogMetricsRefreshFromInsightCreate = (): ToolBase<
},
})
-const DataCatalogRelationshipAcceptSchema = DataCatalogRelationshipProposalsAcceptCreateParams.omit({
- project_id: true,
-})
+const DataCatalogRelationshipAcceptSchema = () => {
+ const DataCatalogRelationshipProposalsAcceptCreateParams =
+ orvalSchemas.DataCatalogRelationshipProposalsAcceptCreateParams()
+ return DataCatalogRelationshipProposalsAcceptCreateParams.omit({ project_id: true })
+}
const DataCatalogRelationshipAcceptSchemaExecute = z.strictObject({
confirmation_hash: z
@@ -424,12 +452,12 @@ const DataCatalogRelationshipAcceptSchemaExecute = z.strictObject({
})
const dataCatalogRelationshipAcceptPrepare = (): ToolBase<
- typeof DataCatalogRelationshipAcceptSchema,
+ ReturnType<typeof DataCatalogRelationshipAcceptSchema>,
PrepareConfirmedActionResult
> => ({
name: 'data-catalog-relationship-accept-prepare',
- schema: DataCatalogRelationshipAcceptSchema,
- handler: async (context: Context, params: z.infer<typeof DataCatalogRelationshipAcceptSchema>) => {
+ schema: DataCatalogRelationshipAcceptSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataCatalogRelationshipAcceptSchema>>) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
return await prepareConfirmedAction(context, {
@@ -457,14 +485,17 @@ const dataCatalogRelationshipAcceptExecute = (): ToolBase<
) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
- const __guard = await executeConfirmedAction<z.infer<typeof DataCatalogRelationshipAcceptSchema>>(context, {
- incomingArgs: confirmationParams,
- purpose: 'data-catalog-relationship-accept',
- codec: __runtime.codec,
- ledger: __runtime.ledger,
- stash: __runtime.stash,
- expectedScope: { projectId: String(__scopeProjectId) },
- })
+ const __guard = await executeConfirmedAction<z.infer<ReturnType<typeof DataCatalogRelationshipAcceptSchema>>>(
+ context,
+ {
+ incomingArgs: confirmationParams,
+ purpose: 'data-catalog-relationship-accept',
+ codec: __runtime.codec,
+ ledger: __runtime.ledger,
+ stash: __runtime.stash,
+ expectedScope: { projectId: String(__scopeProjectId) },
+ }
+ )
if (!__guard.ok) {
return __guard.result as never
}
@@ -478,15 +509,18 @@ const dataCatalogRelationshipAcceptExecute = (): ToolBase<
},
})
-const DataCatalogRelationshipProposeSchema = DataCatalogRelationshipProposalsCreateBody
+const DataCatalogRelationshipProposeSchema = () => {
+ const DataCatalogRelationshipProposalsCreateBody = orvalSchemas.DataCatalogRelationshipProposalsCreateBody()
+ return DataCatalogRelationshipProposalsCreateBody
+}
const dataCatalogRelationshipPropose = (): ToolBase<
- typeof DataCatalogRelationshipProposeSchema,
+ ReturnType<typeof DataCatalogRelationshipProposeSchema>,
Schemas.DataCatalogRelationshipProposal
> => ({
name: 'data-catalog-relationship-propose',
- schema: DataCatalogRelationshipProposeSchema,
- handler: async (context: Context, params: z.infer<typeof DataCatalogRelationshipProposeSchema>) => {
+ schema: DataCatalogRelationshipProposeSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataCatalogRelationshipProposeSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.source_table_name !== undefined) {
@@ -525,9 +559,15 @@ const dataCatalogRelationshipPropose = (): ToolBase<
},
})
-const DataCatalogRelationshipRejectSchema = DataCatalogRelationshipProposalsRejectCreateParams.omit({
- project_id: true,
-}).extend(DataCatalogRelationshipProposalsRejectCreateBody.shape)
+const DataCatalogRelationshipRejectSchema = () => {
+ const DataCatalogRelationshipProposalsRejectCreateBody =
+ orvalSchemas.DataCatalogRelationshipProposalsRejectCreateBody()
+ const DataCatalogRelationshipProposalsRejectCreateParams =
+ orvalSchemas.DataCatalogRelationshipProposalsRejectCreateParams()
+ return DataCatalogRelationshipProposalsRejectCreateParams.omit({ project_id: true }).extend(
+ DataCatalogRelationshipProposalsRejectCreateBody.shape
+ )
+}
const DataCatalogRelationshipRejectSchemaExecute = z.strictObject({
confirmation_hash: z
@@ -537,12 +577,12 @@ const DataCatalogRelationshipRejectSchemaExecute = z.strictObject({
})
const dataCatalogRelationshipRejectPrepare = (): ToolBase<
- typeof DataCatalogRelationshipRejectSchema,
+ ReturnType<typeof DataCatalogRelationshipRejectSchema>,
PrepareConfirmedActionResult
> => ({
name: 'data-catalog-relationship-reject-prepare',
- schema: DataCatalogRelationshipRejectSchema,
- handler: async (context: Context, params: z.infer<typeof DataCatalogRelationshipRejectSchema>) => {
+ schema: DataCatalogRelationshipRejectSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataCatalogRelationshipRejectSchema>>) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
return await prepareConfirmedAction(context, {
@@ -570,14 +610,17 @@ const dataCatalogRelationshipRejectExecute = (): ToolBase<
) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
- const __guard = await executeConfirmedAction<z.infer<typeof DataCatalogRelationshipRejectSchema>>(context, {
- incomingArgs: confirmationParams,
- purpose: 'data-catalog-relationship-reject',
- codec: __runtime.codec,
- ledger: __runtime.ledger,
- stash: __runtime.stash,
- expectedScope: { projectId: String(__scopeProjectId) },
- })
+ const __guard = await executeConfirmedAction<z.infer<ReturnType<typeof DataCatalogRelationshipRejectSchema>>>(
+ context,
+ {
+ incomingArgs: confirmationParams,
+ purpose: 'data-catalog-relationship-reject',
+ codec: __runtime.codec,
+ ledger: __runtime.ledger,
+ stash: __runtime.stash,
+ expectedScope: { projectId: String(__scopeProjectId) },
+ }
+ )
if (!__guard.ok) {
return __guard.result as never
}
diff --git a/services/mcp/src/tools/generated/data_quality.ts b/services/mcp/src/tools/generated/data_quality.ts
index 0c4affcce166..9a37116653fa 100644
--- a/services/mcp/src/tools/generated/data_quality.ts
+++ b/services/mcp/src/tools/generated/data_quality.ts
@@ -2,36 +2,22 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- WarehouseSavedQueriesChecksCheckTypesListParams,
- WarehouseSavedQueriesChecksCreateBody,
- WarehouseSavedQueriesChecksCreateParams,
- WarehouseSavedQueriesChecksDestroyParams,
- WarehouseSavedQueriesChecksPartialUpdateBody,
- WarehouseSavedQueriesChecksPartialUpdateParams,
- WarehouseSavedQueriesChecksRunCreateParams,
- WarehouseSavedQueriesChecksRunsListParams,
- WarehouseTablesChecksCreateBody,
- WarehouseTablesChecksCreateParams,
- WarehouseTablesChecksDestroyParams,
- WarehouseTablesChecksPartialUpdateBody,
- WarehouseTablesChecksPartialUpdateParams,
- WarehouseTablesChecksRunCreateParams,
- WarehouseTablesChecksRunsListParams,
-} from '@/generated/data_quality/api'
+import * as orvalSchemas from '@/generated/data_quality/api'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const DataQualityCheckCreateOnTableSchema = WarehouseTablesChecksCreateParams.omit({ project_id: true }).extend(
- WarehouseTablesChecksCreateBody.shape
-)
+const DataQualityCheckCreateOnTableSchema = () => {
+ const WarehouseTablesChecksCreateBody = orvalSchemas.WarehouseTablesChecksCreateBody()
+ const WarehouseTablesChecksCreateParams = orvalSchemas.WarehouseTablesChecksCreateParams()
+ return WarehouseTablesChecksCreateParams.omit({ project_id: true }).extend(WarehouseTablesChecksCreateBody.shape)
+}
const dataQualityCheckCreateOnTable = (): ToolBase<
- typeof DataQualityCheckCreateOnTableSchema,
+ ReturnType<typeof DataQualityCheckCreateOnTableSchema>,
Schemas.DataQualityCheck
> => ({
name: 'data-quality-check-create-on-table',
- schema: DataQualityCheckCreateOnTableSchema,
- handler: async (context: Context, params: z.infer<typeof DataQualityCheckCreateOnTableSchema>) => {
+ schema: DataQualityCheckCreateOnTableSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataQualityCheckCreateOnTableSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -80,17 +66,21 @@ const dataQualityCheckCreateOnTable = (): ToolBase<
},
})
-const DataQualityCheckCreateOnViewSchema = WarehouseSavedQueriesChecksCreateParams.omit({ project_id: true }).extend(
- WarehouseSavedQueriesChecksCreateBody.shape
-)
+const DataQualityCheckCreateOnViewSchema = () => {
+ const WarehouseSavedQueriesChecksCreateBody = orvalSchemas.WarehouseSavedQueriesChecksCreateBody()
+ const WarehouseSavedQueriesChecksCreateParams = orvalSchemas.WarehouseSavedQueriesChecksCreateParams()
+ return WarehouseSavedQueriesChecksCreateParams.omit({ project_id: true }).extend(
+ WarehouseSavedQueriesChecksCreateBody.shape
+ )
+}
const dataQualityCheckCreateOnView = (): ToolBase<
- typeof DataQualityCheckCreateOnViewSchema,
+ ReturnType<typeof DataQualityCheckCreateOnViewSchema>,
Schemas.DataQualityCheck
> => ({
name: 'data-quality-check-create-on-view',
- schema: DataQualityCheckCreateOnViewSchema,
- handler: async (context: Context, params: z.infer<typeof DataQualityCheckCreateOnViewSchema>) => {
+ schema: DataQualityCheckCreateOnViewSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataQualityCheckCreateOnViewSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -139,12 +129,18 @@ const dataQualityCheckCreateOnView = (): ToolBase<
},
})
-const DataQualityCheckDeleteOnTableSchema = WarehouseTablesChecksDestroyParams.omit({ project_id: true })
+const DataQualityCheckDeleteOnTableSchema = () => {
+ const WarehouseTablesChecksDestroyParams = orvalSchemas.WarehouseTablesChecksDestroyParams()
+ return WarehouseTablesChecksDestroyParams.omit({ project_id: true })
+}
-const dataQualityCheckDeleteOnTable = (): ToolBase<typeof DataQualityCheckDeleteOnTableSchema, unknown> => ({
+const dataQualityCheckDeleteOnTable = (): ToolBase<
+ ReturnType<typeof DataQualityCheckDeleteOnTableSchema>,
+ unknown
+> => ({
name: 'data-quality-check-delete-on-table',
- schema: DataQualityCheckDeleteOnTableSchema,
- handler: async (context: Context, params: z.infer<typeof DataQualityCheckDeleteOnTableSchema>) => {
+ schema: DataQualityCheckDeleteOnTableSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataQualityCheckDeleteOnTableSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -154,12 +150,15 @@ const dataQualityCheckDeleteOnTable = (): ToolBase<typeof DataQualityCheckDelete
},
})
-const DataQualityCheckDeleteOnViewSchema = WarehouseSavedQueriesChecksDestroyParams.omit({ project_id: true })
+const DataQualityCheckDeleteOnViewSchema = () => {
+ const WarehouseSavedQueriesChecksDestroyParams = orvalSchemas.WarehouseSavedQueriesChecksDestroyParams()
+ return WarehouseSavedQueriesChecksDestroyParams.omit({ project_id: true })
+}
-const dataQualityCheckDeleteOnView = (): ToolBase<typeof DataQualityCheckDeleteOnViewSchema, unknown> => ({
+const dataQualityCheckDeleteOnView = (): ToolBase<ReturnType<typeof DataQualityCheckDeleteOnViewSchema>, unknown> => ({
name: 'data-quality-check-delete-on-view',
- schema: DataQualityCheckDeleteOnViewSchema,
- handler: async (context: Context, params: z.infer<typeof DataQualityCheckDeleteOnViewSchema>) => {
+ schema: DataQualityCheckDeleteOnViewSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataQualityCheckDeleteOnViewSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -169,15 +168,18 @@ const dataQualityCheckDeleteOnView = (): ToolBase<typeof DataQualityCheckDeleteO
},
})
-const DataQualityCheckResultsOnTableSchema = WarehouseTablesChecksRunsListParams.omit({ project_id: true })
+const DataQualityCheckResultsOnTableSchema = () => {
+ const WarehouseTablesChecksRunsListParams = orvalSchemas.WarehouseTablesChecksRunsListParams()
+ return WarehouseTablesChecksRunsListParams.omit({ project_id: true })
+}
const dataQualityCheckResultsOnTable = (): ToolBase<
- typeof DataQualityCheckResultsOnTableSchema,
+ ReturnType<typeof DataQualityCheckResultsOnTableSchema>,
Schemas.DataQualityCheckRun[]
> => ({
name: 'data-quality-check-results-on-table',
- schema: DataQualityCheckResultsOnTableSchema,
- handler: async (context: Context, params: z.infer<typeof DataQualityCheckResultsOnTableSchema>) => {
+ schema: DataQualityCheckResultsOnTableSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataQualityCheckResultsOnTableSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.DataQualityCheckRun[]>({
method: 'GET',
@@ -187,15 +189,18 @@ const dataQualityCheckResultsOnTable = (): ToolBase<
},
})
-const DataQualityCheckResultsOnViewSchema = WarehouseSavedQueriesChecksRunsListParams.omit({ project_id: true })
+const DataQualityCheckResultsOnViewSchema = () => {
+ const WarehouseSavedQueriesChecksRunsListParams = orvalSchemas.WarehouseSavedQueriesChecksRunsListParams()
+ return WarehouseSavedQueriesChecksRunsListParams.omit({ project_id: true })
+}
const dataQualityCheckResultsOnView = (): ToolBase<
- typeof DataQualityCheckResultsOnViewSchema,
+ ReturnType<typeof DataQualityCheckResultsOnViewSchema>,
Schemas.DataQualityCheckRun[]
> => ({
name: 'data-quality-check-results-on-view',
- schema: DataQualityCheckResultsOnViewSchema,
- handler: async (context: Context, params: z.infer<typeof DataQualityCheckResultsOnViewSchema>) => {
+ schema: DataQualityCheckResultsOnViewSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataQualityCheckResultsOnViewSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.DataQualityCheckRun[]>({
method: 'GET',
@@ -205,15 +210,18 @@ const dataQualityCheckResultsOnView = (): ToolBase<
},
})
-const DataQualityCheckRunOnTableSchema = WarehouseTablesChecksRunCreateParams.omit({ project_id: true })
+const DataQualityCheckRunOnTableSchema = () => {
+ const WarehouseTablesChecksRunCreateParams = orvalSchemas.WarehouseTablesChecksRunCreateParams()
+ return WarehouseTablesChecksRunCreateParams.omit({ project_id: true })
+}
const dataQualityCheckRunOnTable = (): ToolBase<
- typeof DataQualityCheckRunOnTableSchema,
+ ReturnType<typeof DataQualityCheckRunOnTableSchema>,
Schemas.DataQualitySuiteRun
> => ({
name: 'data-quality-check-run-on-table',
- schema: DataQualityCheckRunOnTableSchema,
- handler: async (context: Context, params: z.infer<typeof DataQualityCheckRunOnTableSchema>) => {
+ schema: DataQualityCheckRunOnTableSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataQualityCheckRunOnTableSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.DataQualitySuiteRun>({
method: 'POST',
@@ -223,15 +231,18 @@ const dataQualityCheckRunOnTable = (): ToolBase<
},
})
-const DataQualityCheckRunOnViewSchema = WarehouseSavedQueriesChecksRunCreateParams.omit({ project_id: true })
+const DataQualityCheckRunOnViewSchema = () => {
+ const WarehouseSavedQueriesChecksRunCreateParams = orvalSchemas.WarehouseSavedQueriesChecksRunCreateParams()
+ return WarehouseSavedQueriesChecksRunCreateParams.omit({ project_id: true })
+}
const dataQualityCheckRunOnView = (): ToolBase<
- typeof DataQualityCheckRunOnViewSchema,
+ ReturnType<typeof DataQualityCheckRunOnViewSchema>,
Schemas.DataQualitySuiteRun
> => ({
name: 'data-quality-check-run-on-view',
- schema: DataQualityCheckRunOnViewSchema,
- handler: async (context: Context, params: z.infer<typeof DataQualityCheckRunOnViewSchema>) => {
+ schema: DataQualityCheckRunOnViewSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataQualityCheckRunOnViewSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.DataQualitySuiteRun>({
method: 'POST',
@@ -241,12 +252,19 @@ const dataQualityCheckRunOnView = (): ToolBase<
},
})
-const DataQualityCheckTypesSchema = WarehouseSavedQueriesChecksCheckTypesListParams.omit({ project_id: true })
+const DataQualityCheckTypesSchema = () => {
+ const WarehouseSavedQueriesChecksCheckTypesListParams =
+ orvalSchemas.WarehouseSavedQueriesChecksCheckTypesListParams()
+ return WarehouseSavedQueriesChecksCheckTypesListParams.omit({ project_id: true })
+}
-const dataQualityCheckTypes = (): ToolBase<typeof DataQualityCheckTypesSchema, Schemas.DataQualityCheckType[]> => ({
+const dataQualityCheckTypes = (): ToolBase<
+ ReturnType<typeof DataQualityCheckTypesSchema>,
+ Schemas.DataQualityCheckType[]
+> => ({
name: 'data-quality-check-types',
- schema: DataQualityCheckTypesSchema,
- handler: async (context: Context, params: z.infer<typeof DataQualityCheckTypesSchema>) => {
+ schema: DataQualityCheckTypesSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataQualityCheckTypesSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.DataQualityCheckType[]>({
method: 'GET',
@@ -256,17 +274,21 @@ const dataQualityCheckTypes = (): ToolBase<typeof DataQualityCheckTypesSchema, S
},
})
-const DataQualityCheckUpdateOnTableSchema = WarehouseTablesChecksPartialUpdateParams.omit({ project_id: true }).extend(
- WarehouseTablesChecksPartialUpdateBody.shape
-)
+const DataQualityCheckUpdateOnTableSchema = () => {
+ const WarehouseTablesChecksPartialUpdateBody = orvalSchemas.WarehouseTablesChecksPartialUpdateBody()
+ const WarehouseTablesChecksPartialUpdateParams = orvalSchemas.WarehouseTablesChecksPartialUpdateParams()
+ return WarehouseTablesChecksPartialUpdateParams.omit({ project_id: true }).extend(
+ WarehouseTablesChecksPartialUpdateBody.shape
+ )
+}
const dataQualityCheckUpdateOnTable = (): ToolBase<
- typeof DataQualityCheckUpdateOnTableSchema,
+ ReturnType<typeof DataQualityCheckUpdateOnTableSchema>,
Schemas.DataQualityCheck
> => ({
name: 'data-quality-check-update-on-table',
- schema: DataQualityCheckUpdateOnTableSchema,
- handler: async (context: Context, params: z.infer<typeof DataQualityCheckUpdateOnTableSchema>) => {
+ schema: DataQualityCheckUpdateOnTableSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataQualityCheckUpdateOnTableSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -314,17 +336,21 @@ const dataQualityCheckUpdateOnTable = (): ToolBase<
},
})
-const DataQualityCheckUpdateOnViewSchema = WarehouseSavedQueriesChecksPartialUpdateParams.omit({
- project_id: true,
-}).extend(WarehouseSavedQueriesChecksPartialUpdateBody.shape)
+const DataQualityCheckUpdateOnViewSchema = () => {
+ const WarehouseSavedQueriesChecksPartialUpdateBody = orvalSchemas.WarehouseSavedQueriesChecksPartialUpdateBody()
+ const WarehouseSavedQueriesChecksPartialUpdateParams = orvalSchemas.WarehouseSavedQueriesChecksPartialUpdateParams()
+ return WarehouseSavedQueriesChecksPartialUpdateParams.omit({ project_id: true }).extend(
+ WarehouseSavedQueriesChecksPartialUpdateBody.shape
+ )
+}
const dataQualityCheckUpdateOnView = (): ToolBase<
- typeof DataQualityCheckUpdateOnViewSchema,
+ ReturnType<typeof DataQualityCheckUpdateOnViewSchema>,
Schemas.DataQualityCheck
> => ({
name: 'data-quality-check-update-on-view',
- schema: DataQualityCheckUpdateOnViewSchema,
- handler: async (context: Context, params: z.infer<typeof DataQualityCheckUpdateOnViewSchema>) => {
+ schema: DataQualityCheckUpdateOnViewSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataQualityCheckUpdateOnViewSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
diff --git a/services/mcp/src/tools/generated/data_warehouse.ts b/services/mcp/src/tools/generated/data_warehouse.ts
index 3db8fccd6b74..5a7e3893e3ff 100644
--- a/services/mcp/src/tools/generated/data_warehouse.ts
+++ b/services/mcp/src/tools/generated/data_warehouse.ts
@@ -2,34 +2,7 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- DataWarehouseManagedWarehouseMonitoringTimeseriesRetrieveQueryParams,
- InsightVariablesCreateBody,
- InsightVariablesDestroyParams,
- InsightVariablesPartialUpdateBody,
- InsightVariablesPartialUpdateParams,
- SavedQueryColumnAnnotationsCreateBody,
- SavedQueryColumnAnnotationsListQueryParams,
- WarehouseColumnAnnotationsCreateBody,
- WarehouseColumnAnnotationsListQueryParams,
- WarehouseColumnAnnotationsPartialUpdateBody,
- WarehouseColumnAnnotationsPartialUpdateParams,
- WarehouseSavedQueriesCreateBody,
- WarehouseSavedQueriesDestroyParams,
- WarehouseSavedQueriesListQueryParams,
- WarehouseSavedQueriesMaterializeCreateBody,
- WarehouseSavedQueriesMaterializeCreateParams,
- WarehouseSavedQueriesPartialUpdateBody,
- WarehouseSavedQueriesPartialUpdateParams,
- WarehouseSavedQueriesRetrieveParams,
- WarehouseSavedQueriesRevertMaterializationCreateBody,
- WarehouseSavedQueriesRevertMaterializationCreateParams,
- WarehouseSavedQueriesRunCreateBody,
- WarehouseSavedQueriesRunCreateParams,
- WarehouseSavedQueriesRunHistoryRetrieveParams,
- WarehouseTablesCreateBody,
- WarehouseTablesRefreshSchemaCreateParams,
-} from '@/generated/data_warehouse/api'
+import * as orvalSchemas from '@/generated/data_warehouse/api'
import {
withPostHogUrl,
pickResponseFields,
@@ -39,15 +12,19 @@ import {
} from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const ManagedWarehouseMetricHistoryGetSchema = DataWarehouseManagedWarehouseMonitoringTimeseriesRetrieveQueryParams
+const ManagedWarehouseMetricHistoryGetSchema = () => {
+ const DataWarehouseManagedWarehouseMonitoringTimeseriesRetrieveQueryParams =
+ orvalSchemas.DataWarehouseManagedWarehouseMonitoringTimeseriesRetrieveQueryParams()
+ return DataWarehouseManagedWarehouseMonitoringTimeseriesRetrieveQueryParams
+}
const managedWarehouseMetricHistoryGet = (): ToolBase<
- typeof ManagedWarehouseMetricHistoryGetSchema,
+ ReturnType<typeof ManagedWarehouseMetricHistoryGetSchema>,
Schemas.ManagedWarehouseMonitoringSeriesResponse
> => ({
name: 'managed-warehouse-metric-history-get',
- schema: ManagedWarehouseMetricHistoryGetSchema,
- handler: async (context: Context, params: z.infer<typeof ManagedWarehouseMetricHistoryGetSchema>) => {
+ schema: ManagedWarehouseMetricHistoryGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ManagedWarehouseMetricHistoryGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ManagedWarehouseMonitoringSeriesResponse>({
method: 'GET',
@@ -61,16 +38,15 @@ const managedWarehouseMetricHistoryGet = (): ToolBase<
},
})
-const ManagedWarehouseMonitoringGetSchema = z.object({})
+const ManagedWarehouseMonitoringGetSchema = () => z.object({})
const managedWarehouseMonitoringGet = (): ToolBase<
- typeof ManagedWarehouseMonitoringGetSchema,
+ ReturnType<typeof ManagedWarehouseMonitoringGetSchema>,
Schemas.ManagedWarehouseMonitoringSnapshotResponse
> => ({
name: 'managed-warehouse-monitoring-get',
- schema: ManagedWarehouseMonitoringGetSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof ManagedWarehouseMonitoringGetSchema>) => {
+ schema: ManagedWarehouseMonitoringGetSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof ManagedWarehouseMonitoringGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ManagedWarehouseMonitoringSnapshotResponse>({
method: 'GET',
@@ -80,19 +56,22 @@ const managedWarehouseMonitoringGet = (): ToolBase<
},
})
-const SavedQueryColumnAnnotationsCreateSchema = SavedQueryColumnAnnotationsCreateBody.extend({
- column_name: SavedQueryColumnAnnotationsCreateBody.shape['column_name'].describe(
- 'Column to describe. Use an empty string to describe the view itself.'
- ),
-})
+const SavedQueryColumnAnnotationsCreateSchema = () => {
+ const SavedQueryColumnAnnotationsCreateBody = orvalSchemas.SavedQueryColumnAnnotationsCreateBody()
+ return SavedQueryColumnAnnotationsCreateBody.extend({
+ column_name: SavedQueryColumnAnnotationsCreateBody.shape['column_name'].describe(
+ 'Column to describe. Use an empty string to describe the view itself.'
+ ),
+ })
+}
const savedQueryColumnAnnotationsCreate = (): ToolBase<
- typeof SavedQueryColumnAnnotationsCreateSchema,
+ ReturnType<typeof SavedQueryColumnAnnotationsCreateSchema>,
Schemas.DataWarehouseSavedQueryColumnAnnotation
> => ({
name: 'saved-query-column-annotations-create',
- schema: SavedQueryColumnAnnotationsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof SavedQueryColumnAnnotationsCreateSchema>) => {
+ schema: SavedQueryColumnAnnotationsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SavedQueryColumnAnnotationsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.saved_query !== undefined) {
@@ -113,15 +92,18 @@ const savedQueryColumnAnnotationsCreate = (): ToolBase<
},
})
-const SavedQueryColumnAnnotationsListSchema = SavedQueryColumnAnnotationsListQueryParams
+const SavedQueryColumnAnnotationsListSchema = () => {
+ const SavedQueryColumnAnnotationsListQueryParams = orvalSchemas.SavedQueryColumnAnnotationsListQueryParams()
+ return SavedQueryColumnAnnotationsListQueryParams
+}
const savedQueryColumnAnnotationsList = (): ToolBase<
- typeof SavedQueryColumnAnnotationsListSchema,
+ ReturnType<typeof SavedQueryColumnAnnotationsListSchema>,
WithPostHogUrl<Schemas.PaginatedDataWarehouseSavedQueryColumnAnnotationList>
> => ({
name: 'saved-query-column-annotations-list',
- schema: SavedQueryColumnAnnotationsListSchema,
- handler: async (context: Context, params: z.infer<typeof SavedQueryColumnAnnotationsListSchema>) => {
+ schema: SavedQueryColumnAnnotationsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SavedQueryColumnAnnotationsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedDataWarehouseSavedQueryColumnAnnotationList>({
method: 'GET',
@@ -136,12 +118,15 @@ const savedQueryColumnAnnotationsList = (): ToolBase<
},
})
-const SqlVariablesCreateSchema = InsightVariablesCreateBody
+const SqlVariablesCreateSchema = () => {
+ const InsightVariablesCreateBody = orvalSchemas.InsightVariablesCreateBody()
+ return InsightVariablesCreateBody
+}
-const sqlVariablesCreate = (): ToolBase<typeof SqlVariablesCreateSchema, Schemas.InsightVariable> => ({
+const sqlVariablesCreate = (): ToolBase<ReturnType<typeof SqlVariablesCreateSchema>, Schemas.InsightVariable> => ({
name: 'sql-variables-create',
- schema: SqlVariablesCreateSchema,
- handler: async (context: Context, params: z.infer<typeof SqlVariablesCreateSchema>) => {
+ schema: SqlVariablesCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SqlVariablesCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -174,12 +159,15 @@ const sqlVariablesCreate = (): ToolBase<typeof SqlVariablesCreateSchema, Schemas
},
})
-const SqlVariablesDeleteSchema = InsightVariablesDestroyParams.omit({ project_id: true })
+const SqlVariablesDeleteSchema = () => {
+ const InsightVariablesDestroyParams = orvalSchemas.InsightVariablesDestroyParams()
+ return InsightVariablesDestroyParams.omit({ project_id: true })
+}
-const sqlVariablesDelete = (): ToolBase<typeof SqlVariablesDeleteSchema, unknown> => ({
+const sqlVariablesDelete = (): ToolBase<ReturnType<typeof SqlVariablesDeleteSchema>, unknown> => ({
name: 'sql-variables-delete',
- schema: SqlVariablesDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof SqlVariablesDeleteSchema>) => {
+ schema: SqlVariablesDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SqlVariablesDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -189,14 +177,18 @@ const sqlVariablesDelete = (): ToolBase<typeof SqlVariablesDeleteSchema, unknown
},
})
-const SqlVariablesUpdateSchema = InsightVariablesPartialUpdateParams.omit({ project_id: true }).extend(
- InsightVariablesPartialUpdateBody.shape
-)
+const SqlVariablesUpdateSchema = () => {
+ const InsightVariablesPartialUpdateBody = orvalSchemas.InsightVariablesPartialUpdateBody()
+ const InsightVariablesPartialUpdateParams = orvalSchemas.InsightVariablesPartialUpdateParams()
+ return InsightVariablesPartialUpdateParams.omit({ project_id: true }).extend(
+ InsightVariablesPartialUpdateBody.shape
+ )
+}
-const sqlVariablesUpdate = (): ToolBase<typeof SqlVariablesUpdateSchema, Schemas.InsightVariable> => ({
+const sqlVariablesUpdate = (): ToolBase<ReturnType<typeof SqlVariablesUpdateSchema>, Schemas.InsightVariable> => ({
name: 'sql-variables-update',
- schema: SqlVariablesUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof SqlVariablesUpdateSchema>) => {
+ schema: SqlVariablesUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SqlVariablesUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -229,16 +221,22 @@ const sqlVariablesUpdate = (): ToolBase<typeof SqlVariablesUpdateSchema, Schemas
},
})
-const ViewCreateSchema = WarehouseSavedQueriesCreateBody.extend({
- name: WarehouseSavedQueriesCreateBody.shape['name'].describe(
- 'Unique name for the view. Used as the table name in HogQL queries. Must not conflict with existing table names.'
- ),
-})
+const ViewCreateSchema = () => {
+ const WarehouseSavedQueriesCreateBody = orvalSchemas.WarehouseSavedQueriesCreateBody()
+ return WarehouseSavedQueriesCreateBody.extend({
+ name: WarehouseSavedQueriesCreateBody.shape['name'].describe(
+ 'Unique name for the view. Used as the table name in HogQL queries. Must not conflict with existing table names.'
+ ),
+ })
+}
-const viewCreate = (): ToolBase<typeof ViewCreateSchema, WithPostHogUrl<Schemas.DataWarehouseSavedQuery>> => ({
+const viewCreate = (): ToolBase<
+ ReturnType<typeof ViewCreateSchema>,
+ WithPostHogUrl<Schemas.DataWarehouseSavedQuery>
+> => ({
name: 'view-create',
- schema: ViewCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ViewCreateSchema>) => {
+ schema: ViewCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ViewCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -274,12 +272,15 @@ const viewCreate = (): ToolBase<typeof ViewCreateSchema, WithPostHogUrl<Schemas.
},
})
-const ViewDeleteSchema = WarehouseSavedQueriesDestroyParams.omit({ project_id: true })
+const ViewDeleteSchema = () => {
+ const WarehouseSavedQueriesDestroyParams = orvalSchemas.WarehouseSavedQueriesDestroyParams()
+ return WarehouseSavedQueriesDestroyParams.omit({ project_id: true })
+}
-const viewDelete = (): ToolBase<typeof ViewDeleteSchema, Schemas.DataWarehouseSavedQuery> => ({
+const viewDelete = (): ToolBase<ReturnType<typeof ViewDeleteSchema>, Schemas.DataWarehouseSavedQuery> => ({
name: 'view-delete',
- schema: ViewDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof ViewDeleteSchema>) => {
+ schema: ViewDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ViewDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.DataWarehouseSavedQuery>({
method: 'PATCH',
@@ -290,12 +291,15 @@ const viewDelete = (): ToolBase<typeof ViewDeleteSchema, Schemas.DataWarehouseSa
},
})
-const ViewGetSchema = WarehouseSavedQueriesRetrieveParams.omit({ project_id: true })
+const ViewGetSchema = () => {
+ const WarehouseSavedQueriesRetrieveParams = orvalSchemas.WarehouseSavedQueriesRetrieveParams()
+ return WarehouseSavedQueriesRetrieveParams.omit({ project_id: true })
+}
-const viewGet = (): ToolBase<typeof ViewGetSchema, WithPostHogUrl<Schemas.DataWarehouseSavedQuery>> => ({
+const viewGet = (): ToolBase<ReturnType<typeof ViewGetSchema>, WithPostHogUrl<Schemas.DataWarehouseSavedQuery>> => ({
name: 'view-get',
- schema: ViewGetSchema,
- handler: async (context: Context, params: z.infer<typeof ViewGetSchema>) => {
+ schema: ViewGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ViewGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.DataWarehouseSavedQuery>({
method: 'GET',
@@ -305,15 +309,18 @@ const viewGet = (): ToolBase<typeof ViewGetSchema, WithPostHogUrl<Schemas.DataWa
},
})
-const ViewListSchema = WarehouseSavedQueriesListQueryParams
+const ViewListSchema = () => {
+ const WarehouseSavedQueriesListQueryParams = orvalSchemas.WarehouseSavedQueriesListQueryParams()
+ return WarehouseSavedQueriesListQueryParams
+}
const viewList = (): ToolBase<
- typeof ViewListSchema,
+ ReturnType<typeof ViewListSchema>,
WithPostHogUrl<Schemas.PaginatedDataWarehouseSavedQueryMinimalList>
> => ({
name: 'view-list',
- schema: ViewListSchema,
- handler: async (context: Context, params: z.infer<typeof ViewListSchema>) => {
+ schema: ViewListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ViewListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedDataWarehouseSavedQueryMinimalList>({
method: 'GET',
@@ -336,14 +343,18 @@ const viewList = (): ToolBase<
},
})
-const ViewMaterializeSchema = WarehouseSavedQueriesMaterializeCreateParams.omit({ project_id: true }).extend(
- WarehouseSavedQueriesMaterializeCreateBody.shape
-)
+const ViewMaterializeSchema = () => {
+ const WarehouseSavedQueriesMaterializeCreateBody = orvalSchemas.WarehouseSavedQueriesMaterializeCreateBody()
+ const WarehouseSavedQueriesMaterializeCreateParams = orvalSchemas.WarehouseSavedQueriesMaterializeCreateParams()
+ return WarehouseSavedQueriesMaterializeCreateParams.omit({ project_id: true }).extend(
+ WarehouseSavedQueriesMaterializeCreateBody.shape
+ )
+}
-const viewMaterialize = (): ToolBase<typeof ViewMaterializeSchema, unknown> => ({
+const viewMaterialize = (): ToolBase<ReturnType<typeof ViewMaterializeSchema>, unknown> => ({
name: 'view-materialize',
- schema: ViewMaterializeSchema,
- handler: async (context: Context, params: z.infer<typeof ViewMaterializeSchema>) => {
+ schema: ViewMaterializeSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ViewMaterializeSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.sync_frequency !== undefined) {
@@ -358,14 +369,18 @@ const viewMaterialize = (): ToolBase<typeof ViewMaterializeSchema, unknown> => (
},
})
-const ViewRunSchema = WarehouseSavedQueriesRunCreateParams.omit({ project_id: true }).extend(
- WarehouseSavedQueriesRunCreateBody.shape
-)
+const ViewRunSchema = () => {
+ const WarehouseSavedQueriesRunCreateBody = orvalSchemas.WarehouseSavedQueriesRunCreateBody()
+ const WarehouseSavedQueriesRunCreateParams = orvalSchemas.WarehouseSavedQueriesRunCreateParams()
+ return WarehouseSavedQueriesRunCreateParams.omit({ project_id: true }).extend(
+ WarehouseSavedQueriesRunCreateBody.shape
+ )
+}
-const viewRun = (): ToolBase<typeof ViewRunSchema, unknown> => ({
+const viewRun = (): ToolBase<ReturnType<typeof ViewRunSchema>, unknown> => ({
name: 'view-run',
- schema: ViewRunSchema,
- handler: async (context: Context, params: z.infer<typeof ViewRunSchema>) => {
+ schema: ViewRunSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ViewRunSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.full_refresh !== undefined) {
@@ -380,12 +395,18 @@ const viewRun = (): ToolBase<typeof ViewRunSchema, unknown> => ({
},
})
-const ViewRunHistorySchema = WarehouseSavedQueriesRunHistoryRetrieveParams.omit({ project_id: true })
+const ViewRunHistorySchema = () => {
+ const WarehouseSavedQueriesRunHistoryRetrieveParams = orvalSchemas.WarehouseSavedQueriesRunHistoryRetrieveParams()
+ return WarehouseSavedQueriesRunHistoryRetrieveParams.omit({ project_id: true })
+}
-const viewRunHistory = (): ToolBase<typeof ViewRunHistorySchema, WithPostHogUrl<Schemas.DataWarehouseSavedQuery>> => ({
+const viewRunHistory = (): ToolBase<
+ ReturnType<typeof ViewRunHistorySchema>,
+ WithPostHogUrl<Schemas.DataWarehouseSavedQuery>
+> => ({
name: 'view-run-history',
- schema: ViewRunHistorySchema,
- handler: async (context: Context, params: z.infer<typeof ViewRunHistorySchema>) => {
+ schema: ViewRunHistorySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ViewRunHistorySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.DataWarehouseSavedQuery>({
method: 'GET',
@@ -395,17 +416,23 @@ const viewRunHistory = (): ToolBase<typeof ViewRunHistorySchema, WithPostHogUrl<
},
})
-const ViewUnmaterializeSchema = WarehouseSavedQueriesRevertMaterializationCreateParams.omit({
- project_id: true,
-}).extend(WarehouseSavedQueriesRevertMaterializationCreateBody.shape)
+const ViewUnmaterializeSchema = () => {
+ const WarehouseSavedQueriesRevertMaterializationCreateBody =
+ orvalSchemas.WarehouseSavedQueriesRevertMaterializationCreateBody()
+ const WarehouseSavedQueriesRevertMaterializationCreateParams =
+ orvalSchemas.WarehouseSavedQueriesRevertMaterializationCreateParams()
+ return WarehouseSavedQueriesRevertMaterializationCreateParams.omit({ project_id: true }).extend(
+ WarehouseSavedQueriesRevertMaterializationCreateBody.shape
+ )
+}
const viewUnmaterialize = (): ToolBase<
- typeof ViewUnmaterializeSchema,
+ ReturnType<typeof ViewUnmaterializeSchema>,
WithPostHogUrl<Schemas.DataWarehouseSavedQuery>
> => ({
name: 'view-unmaterialize',
- schema: ViewUnmaterializeSchema,
- handler: async (context: Context, params: z.infer<typeof ViewUnmaterializeSchema>) => {
+ schema: ViewUnmaterializeSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ViewUnmaterializeSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.deleted !== undefined) {
@@ -450,21 +477,28 @@ const viewUnmaterialize = (): ToolBase<
},
})
-const ViewUpdateSchema = WarehouseSavedQueriesPartialUpdateParams.omit({ project_id: true })
- .extend(WarehouseSavedQueriesPartialUpdateBody.shape)
- .extend({
- name: WarehouseSavedQueriesPartialUpdateBody.shape['name'].describe(
- 'Unique name for the view. Used as the table name in HogQL queries. Must not conflict with existing table names.'
- ),
- edited_history_id: WarehouseSavedQueriesPartialUpdateBody.shape['edited_history_id'].describe(
- 'Required when updating the query field. Get this from latest_history_id on the retrieve response. Used for optimistic concurrency control.'
- ),
- })
+const ViewUpdateSchema = () => {
+ const WarehouseSavedQueriesPartialUpdateBody = orvalSchemas.WarehouseSavedQueriesPartialUpdateBody()
+ const WarehouseSavedQueriesPartialUpdateParams = orvalSchemas.WarehouseSavedQueriesPartialUpdateParams()
+ return WarehouseSavedQueriesPartialUpdateParams.omit({ project_id: true })
+ .extend(WarehouseSavedQueriesPartialUpdateBody.shape)
+ .extend({
+ name: WarehouseSavedQueriesPartialUpdateBody.shape['name'].describe(
+ 'Unique name for the view. Used as the table name in HogQL queries. Must not conflict with existing table names.'
+ ),
+ edited_history_id: WarehouseSavedQueriesPartialUpdateBody.shape['edited_history_id'].describe(
+ 'Required when updating the query field. Get this from latest_history_id on the retrieve response. Used for optimistic concurrency control.'
+ ),
+ })
+}
-const viewUpdate = (): ToolBase<typeof ViewUpdateSchema, WithPostHogUrl<Schemas.DataWarehouseSavedQuery>> => ({
+const viewUpdate = (): ToolBase<
+ ReturnType<typeof ViewUpdateSchema>,
+ WithPostHogUrl<Schemas.DataWarehouseSavedQuery>
+> => ({
name: 'view-update',
- schema: ViewUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ViewUpdateSchema>) => {
+ schema: ViewUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ViewUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -503,19 +537,22 @@ const viewUpdate = (): ToolBase<typeof ViewUpdateSchema, WithPostHogUrl<Schemas.
},
})
-const WarehouseColumnAnnotationsCreateSchema = WarehouseColumnAnnotationsCreateBody.extend({
- column_name: WarehouseColumnAnnotationsCreateBody.shape['column_name'].describe(
- 'Column to describe. Use an empty string to describe the table itself.'
- ),
-})
+const WarehouseColumnAnnotationsCreateSchema = () => {
+ const WarehouseColumnAnnotationsCreateBody = orvalSchemas.WarehouseColumnAnnotationsCreateBody()
+ return WarehouseColumnAnnotationsCreateBody.extend({
+ column_name: WarehouseColumnAnnotationsCreateBody.shape['column_name'].describe(
+ 'Column to describe. Use an empty string to describe the table itself.'
+ ),
+ })
+}
const warehouseColumnAnnotationsCreate = (): ToolBase<
- typeof WarehouseColumnAnnotationsCreateSchema,
+ ReturnType<typeof WarehouseColumnAnnotationsCreateSchema>,
Schemas.WarehouseColumnAnnotation
> => ({
name: 'warehouse-column-annotations-create',
- schema: WarehouseColumnAnnotationsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof WarehouseColumnAnnotationsCreateSchema>) => {
+ schema: WarehouseColumnAnnotationsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WarehouseColumnAnnotationsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.table !== undefined) {
@@ -536,15 +573,18 @@ const warehouseColumnAnnotationsCreate = (): ToolBase<
},
})
-const WarehouseColumnAnnotationsListSchema = WarehouseColumnAnnotationsListQueryParams
+const WarehouseColumnAnnotationsListSchema = () => {
+ const WarehouseColumnAnnotationsListQueryParams = orvalSchemas.WarehouseColumnAnnotationsListQueryParams()
+ return WarehouseColumnAnnotationsListQueryParams
+}
const warehouseColumnAnnotationsList = (): ToolBase<
- typeof WarehouseColumnAnnotationsListSchema,
+ ReturnType<typeof WarehouseColumnAnnotationsListSchema>,
WithPostHogUrl<Schemas.PaginatedWarehouseColumnAnnotationList>
> => ({
name: 'warehouse-column-annotations-list',
- schema: WarehouseColumnAnnotationsListSchema,
- handler: async (context: Context, params: z.infer<typeof WarehouseColumnAnnotationsListSchema>) => {
+ schema: WarehouseColumnAnnotationsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WarehouseColumnAnnotationsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedWarehouseColumnAnnotationList>({
method: 'GET',
@@ -559,17 +599,24 @@ const warehouseColumnAnnotationsList = (): ToolBase<
},
})
-const WarehouseColumnAnnotationsPartialUpdateSchema = WarehouseColumnAnnotationsPartialUpdateParams.omit({
- project_id: true,
-}).extend(WarehouseColumnAnnotationsPartialUpdateBody.shape)
+const WarehouseColumnAnnotationsPartialUpdateSchema = () => {
+ const WarehouseColumnAnnotationsPartialUpdateBody = orvalSchemas.WarehouseColumnAnnotationsPartialUpdateBody()
+ const WarehouseColumnAnnotationsPartialUpdateParams = orvalSchemas.WarehouseColumnAnnotationsPartialUpdateParams()
+ return WarehouseColumnAnnotationsPartialUpdateParams.omit({ project_id: true }).extend(
+ WarehouseColumnAnnotationsPartialUpdateBody.shape
+ )
+}
const warehouseColumnAnnotationsPartialUpdate = (): ToolBase<
- typeof WarehouseColumnAnnotationsPartialUpdateSchema,
+ ReturnType<typeof WarehouseColumnAnnotationsPartialUpdateSchema>,
Schemas.WarehouseColumnAnnotation
> => ({
name: 'warehouse-column-annotations-partial-update',
- schema: WarehouseColumnAnnotationsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof WarehouseColumnAnnotationsPartialUpdateSchema>) => {
+ schema: WarehouseColumnAnnotationsPartialUpdateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof WarehouseColumnAnnotationsPartialUpdateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.table !== undefined) {
@@ -590,25 +637,28 @@ const warehouseColumnAnnotationsPartialUpdate = (): ToolBase<
},
})
-const WarehouseTablesCreateSchema = WarehouseTablesCreateBody.extend({
- name: WarehouseTablesCreateBody.shape['name'].describe(
- "Name the agent and the user will query this table by in HogQL. Pick a short snake_case name that describes the data (e.g. `orders`, `stripe_payouts`). It must be unique across the project's tables and views."
- ),
- format: WarehouseTablesCreateBody.shape['format'].describe(
- 'File format of the objects the pattern matches, one of CSV, CSVWithNames (a CSV whose first row is a header), Parquet, JSONEachRow (newline-delimited JSON), or Delta. Do not pass DeltaS3Wrapper, which PostHog uses for its own materialized views.'
- ),
- credential: WarehouseTablesCreateBody.shape['credential'].describe(
- 'Send only `access_key` and `access_secret`, the credentials for the bucket in `url_pattern`. The other fields are set by PostHog and are ignored on create.'
- ),
-})
+const WarehouseTablesCreateSchema = () => {
+ const WarehouseTablesCreateBody = orvalSchemas.WarehouseTablesCreateBody()
+ return WarehouseTablesCreateBody.extend({
+ name: WarehouseTablesCreateBody.shape['name'].describe(
+ "Name the agent and the user will query this table by in HogQL. Pick a short snake_case name that describes the data (e.g. `orders`, `stripe_payouts`). It must be unique across the project's tables and views."
+ ),
+ format: WarehouseTablesCreateBody.shape['format'].describe(
+ 'File format of the objects the pattern matches, one of CSV, CSVWithNames (a CSV whose first row is a header), Parquet, JSONEachRow (newline-delimited JSON), or Delta. Do not pass DeltaS3Wrapper, which PostHog uses for its own materialized views.'
+ ),
+ credential: WarehouseTablesCreateBody.shape['credential'].describe(
+ 'Send only `access_key` and `access_secret`, the credentials for the bucket in `url_pattern`. The other fields are set by PostHog and are ignored on create.'
+ ),
+ })
+}
const warehouseTablesCreate = (): ToolBase<
- typeof WarehouseTablesCreateSchema,
+ ReturnType<typeof WarehouseTablesCreateSchema>,
WithInformationalResponse<Schemas.Table>
> => ({
name: 'warehouse-tables-create',
- schema: WarehouseTablesCreateSchema,
- handler: async (context: Context, params: z.infer<typeof WarehouseTablesCreateSchema>) => {
+ schema: WarehouseTablesCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WarehouseTablesCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.deleted !== undefined) {
@@ -651,12 +701,18 @@ const warehouseTablesCreate = (): ToolBase<
},
})
-const WarehouseTablesRefreshSchemaCreateSchema = WarehouseTablesRefreshSchemaCreateParams.omit({ project_id: true })
+const WarehouseTablesRefreshSchemaCreateSchema = () => {
+ const WarehouseTablesRefreshSchemaCreateParams = orvalSchemas.WarehouseTablesRefreshSchemaCreateParams()
+ return WarehouseTablesRefreshSchemaCreateParams.omit({ project_id: true })
+}
-const warehouseTablesRefreshSchemaCreate = (): ToolBase<typeof WarehouseTablesRefreshSchemaCreateSchema, unknown> => ({
+const warehouseTablesRefreshSchemaCreate = (): ToolBase<
+ ReturnType<typeof WarehouseTablesRefreshSchemaCreateSchema>,
+ unknown
+> => ({
name: 'warehouse-tables-refresh-schema-create',
- schema: WarehouseTablesRefreshSchemaCreateSchema,
- handler: async (context: Context, params: z.infer<typeof WarehouseTablesRefreshSchemaCreateSchema>) => {
+ schema: WarehouseTablesRefreshSchemaCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WarehouseTablesRefreshSchemaCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'POST',
diff --git a/services/mcp/src/tools/generated/docs.ts b/services/mcp/src/tools/generated/docs.ts
index 5c196ff3806f..2a25419c3bfd 100644
--- a/services/mcp/src/tools/generated/docs.ts
+++ b/services/mcp/src/tools/generated/docs.ts
@@ -2,15 +2,18 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import { DocsSearchBody } from '@/generated/docs/api'
+import * as orvalSchemas from '@/generated/docs/api'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const DocsSearchSchema = DocsSearchBody
+const DocsSearchSchema = () => {
+ const DocsSearchBody = orvalSchemas.DocsSearchBody()
+ return DocsSearchBody
+}
-const docsSearch = (): ToolBase<typeof DocsSearchSchema, Schemas.DocsSearchResponse> => ({
+const docsSearch = (): ToolBase<ReturnType<typeof DocsSearchSchema>, Schemas.DocsSearchResponse> => ({
name: 'docs-search',
- schema: DocsSearchSchema,
- handler: async (context: Context, params: z.infer<typeof DocsSearchSchema>) => {
+ schema: DocsSearchSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DocsSearchSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
diff --git a/services/mcp/src/tools/generated/early_access_features.ts b/services/mcp/src/tools/generated/early_access_features.ts
index 8a6ed4eff7db..4d7ee9b35947 100644
--- a/services/mcp/src/tools/generated/early_access_features.ts
+++ b/services/mcp/src/tools/generated/early_access_features.ts
@@ -2,26 +2,22 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- EarlyAccessFeatureCreateBody,
- EarlyAccessFeatureDestroyParams,
- EarlyAccessFeatureListQueryParams,
- EarlyAccessFeaturePartialUpdateBody,
- EarlyAccessFeaturePartialUpdateParams,
- EarlyAccessFeatureRetrieveParams,
-} from '@/generated/early_access_features/api'
+import * as orvalSchemas from '@/generated/early_access_features/api'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const EarlyAccessFeatureCreateSchema = EarlyAccessFeatureCreateBody.omit({ _create_in_folder: true })
+const EarlyAccessFeatureCreateSchema = () => {
+ const EarlyAccessFeatureCreateBody = orvalSchemas.EarlyAccessFeatureCreateBody()
+ return EarlyAccessFeatureCreateBody.omit({ _create_in_folder: true })
+}
const earlyAccessFeatureCreate = (): ToolBase<
- typeof EarlyAccessFeatureCreateSchema,
+ ReturnType<typeof EarlyAccessFeatureCreateSchema>,
WithPostHogUrl<Schemas.EarlyAccessFeatureSerializerCreateOnly>
> => ({
name: 'early-access-feature-create',
- schema: EarlyAccessFeatureCreateSchema,
- handler: async (context: Context, params: z.infer<typeof EarlyAccessFeatureCreateSchema>) => {
+ schema: EarlyAccessFeatureCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EarlyAccessFeatureCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -51,12 +47,15 @@ const earlyAccessFeatureCreate = (): ToolBase<
},
})
-const EarlyAccessFeatureDestroySchema = EarlyAccessFeatureDestroyParams.omit({ project_id: true })
+const EarlyAccessFeatureDestroySchema = () => {
+ const EarlyAccessFeatureDestroyParams = orvalSchemas.EarlyAccessFeatureDestroyParams()
+ return EarlyAccessFeatureDestroyParams.omit({ project_id: true })
+}
-const earlyAccessFeatureDestroy = (): ToolBase<typeof EarlyAccessFeatureDestroySchema, unknown> => ({
+const earlyAccessFeatureDestroy = (): ToolBase<ReturnType<typeof EarlyAccessFeatureDestroySchema>, unknown> => ({
name: 'early-access-feature-destroy',
- schema: EarlyAccessFeatureDestroySchema,
- handler: async (context: Context, params: z.infer<typeof EarlyAccessFeatureDestroySchema>) => {
+ schema: EarlyAccessFeatureDestroySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EarlyAccessFeatureDestroySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -66,15 +65,18 @@ const earlyAccessFeatureDestroy = (): ToolBase<typeof EarlyAccessFeatureDestroyS
},
})
-const EarlyAccessFeatureListSchema = EarlyAccessFeatureListQueryParams
+const EarlyAccessFeatureListSchema = () => {
+ const EarlyAccessFeatureListQueryParams = orvalSchemas.EarlyAccessFeatureListQueryParams()
+ return EarlyAccessFeatureListQueryParams
+}
const earlyAccessFeatureList = (): ToolBase<
- typeof EarlyAccessFeatureListSchema,
+ ReturnType<typeof EarlyAccessFeatureListSchema>,
WithPostHogUrl<Schemas.PaginatedEarlyAccessFeatureList>
> => ({
name: 'early-access-feature-list',
- schema: EarlyAccessFeatureListSchema,
- handler: async (context: Context, params: z.infer<typeof EarlyAccessFeatureListSchema>) => {
+ schema: EarlyAccessFeatureListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EarlyAccessFeatureListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedEarlyAccessFeatureList>({
method: 'GET',
@@ -88,17 +90,21 @@ const earlyAccessFeatureList = (): ToolBase<
},
})
-const EarlyAccessFeaturePartialUpdateSchema = EarlyAccessFeaturePartialUpdateParams.omit({ project_id: true }).extend(
- EarlyAccessFeaturePartialUpdateBody.shape
-)
+const EarlyAccessFeaturePartialUpdateSchema = () => {
+ const EarlyAccessFeaturePartialUpdateBody = orvalSchemas.EarlyAccessFeaturePartialUpdateBody()
+ const EarlyAccessFeaturePartialUpdateParams = orvalSchemas.EarlyAccessFeaturePartialUpdateParams()
+ return EarlyAccessFeaturePartialUpdateParams.omit({ project_id: true }).extend(
+ EarlyAccessFeaturePartialUpdateBody.shape
+ )
+}
const earlyAccessFeaturePartialUpdate = (): ToolBase<
- typeof EarlyAccessFeaturePartialUpdateSchema,
+ ReturnType<typeof EarlyAccessFeaturePartialUpdateSchema>,
WithPostHogUrl<Schemas.EarlyAccessFeature>
> => ({
name: 'early-access-feature-partial-update',
- schema: EarlyAccessFeaturePartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof EarlyAccessFeaturePartialUpdateSchema>) => {
+ schema: EarlyAccessFeaturePartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EarlyAccessFeaturePartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -122,15 +128,18 @@ const earlyAccessFeaturePartialUpdate = (): ToolBase<
},
})
-const EarlyAccessFeatureRetrieveSchema = EarlyAccessFeatureRetrieveParams.omit({ project_id: true })
+const EarlyAccessFeatureRetrieveSchema = () => {
+ const EarlyAccessFeatureRetrieveParams = orvalSchemas.EarlyAccessFeatureRetrieveParams()
+ return EarlyAccessFeatureRetrieveParams.omit({ project_id: true })
+}
const earlyAccessFeatureRetrieve = (): ToolBase<
- typeof EarlyAccessFeatureRetrieveSchema,
+ ReturnType<typeof EarlyAccessFeatureRetrieveSchema>,
WithPostHogUrl<Schemas.EarlyAccessFeature>
> => ({
name: 'early-access-feature-retrieve',
- schema: EarlyAccessFeatureRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof EarlyAccessFeatureRetrieveSchema>) => {
+ schema: EarlyAccessFeatureRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EarlyAccessFeatureRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.EarlyAccessFeature>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/email_templates.ts b/services/mcp/src/tools/generated/email_templates.ts
index 7ab4573a7d25..5f29e7ff3a41 100644
--- a/services/mcp/src/tools/generated/email_templates.ts
+++ b/services/mcp/src/tools/generated/email_templates.ts
@@ -2,27 +2,24 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- MessagingTemplatesCreateBody,
- MessagingTemplatesListQueryParams,
- MessagingTemplatesPartialUpdateBody,
- MessagingTemplatesPartialUpdateParams,
- MessagingTemplatesRetrieveParams,
-} from '@/generated/email_templates/api'
+import * as orvalSchemas from '@/generated/email_templates/api'
import { withUiApp } from '@/resources/ui-apps'
import { EmailTemplateDesignPatchSchema } from '@/schema/tool-inputs'
import { withPostHogUrl, omitResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const WorkflowsCreateEmailTemplateSchema = MessagingTemplatesCreateBody
+const WorkflowsCreateEmailTemplateSchema = () => {
+ const MessagingTemplatesCreateBody = orvalSchemas.MessagingTemplatesCreateBody()
+ return MessagingTemplatesCreateBody
+}
const workflowsCreateEmailTemplate = (): ToolBase<
- typeof WorkflowsCreateEmailTemplateSchema,
+ ReturnType<typeof WorkflowsCreateEmailTemplateSchema>,
WithPostHogUrl<Schemas.MessageTemplate>
> => ({
name: 'workflows-create-email-template',
- schema: WorkflowsCreateEmailTemplateSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsCreateEmailTemplateSchema>) => {
+ schema: WorkflowsCreateEmailTemplateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsCreateEmailTemplateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -53,15 +50,18 @@ const workflowsCreateEmailTemplate = (): ToolBase<
},
})
-const WorkflowsGetEmailTemplateSchema = MessagingTemplatesRetrieveParams.omit({ project_id: true })
+const WorkflowsGetEmailTemplateSchema = () => {
+ const MessagingTemplatesRetrieveParams = orvalSchemas.MessagingTemplatesRetrieveParams()
+ return MessagingTemplatesRetrieveParams.omit({ project_id: true })
+}
const workflowsGetEmailTemplate = (): ToolBase<
- typeof WorkflowsGetEmailTemplateSchema,
+ ReturnType<typeof WorkflowsGetEmailTemplateSchema>,
WithPostHogUrl<Schemas.MessageTemplate>
> => ({
name: 'workflows-get-email-template',
- schema: WorkflowsGetEmailTemplateSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsGetEmailTemplateSchema>) => {
+ schema: WorkflowsGetEmailTemplateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsGetEmailTemplateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.MessageTemplate>({
method: 'GET',
@@ -72,15 +72,18 @@ const workflowsGetEmailTemplate = (): ToolBase<
},
})
-const WorkflowsListEmailTemplatesSchema = MessagingTemplatesListQueryParams
+const WorkflowsListEmailTemplatesSchema = () => {
+ const MessagingTemplatesListQueryParams = orvalSchemas.MessagingTemplatesListQueryParams()
+ return MessagingTemplatesListQueryParams
+}
const workflowsListEmailTemplates = (): ToolBase<
- typeof WorkflowsListEmailTemplatesSchema,
+ ReturnType<typeof WorkflowsListEmailTemplatesSchema>,
WithPostHogUrl<Schemas.PaginatedMessageTemplateList>
> => ({
name: 'workflows-list-email-templates',
- schema: WorkflowsListEmailTemplatesSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsListEmailTemplatesSchema>) => {
+ schema: WorkflowsListEmailTemplatesSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsListEmailTemplatesSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedMessageTemplateList>({
method: 'GET',
@@ -109,17 +112,17 @@ const workflowsListEmailTemplates = (): ToolBase<
},
})
-const WorkflowsPatchEmailTemplateSchema = EmailTemplateDesignPatchSchema
+const WorkflowsPatchEmailTemplateSchema = () => EmailTemplateDesignPatchSchema
const workflowsPatchEmailTemplate = (): ToolBase<
- typeof WorkflowsPatchEmailTemplateSchema,
+ ReturnType<typeof WorkflowsPatchEmailTemplateSchema>,
Schemas.MessageTemplate
> => ({
name: 'workflows-patch-email-template',
- schema: WorkflowsPatchEmailTemplateSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsPatchEmailTemplateSchema>) => {
+ schema: WorkflowsPatchEmailTemplateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsPatchEmailTemplateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
- const parsedParams = WorkflowsPatchEmailTemplateSchema.parse(params)
+ const parsedParams = WorkflowsPatchEmailTemplateSchema().parse(params)
const { id, ...body } = parsedParams
const result = await context.api.request<Schemas.MessageTemplate>({
method: 'PATCH',
@@ -131,16 +134,19 @@ const workflowsPatchEmailTemplate = (): ToolBase<
},
})
-const WorkflowsShowEmailTemplateSchema = MessagingTemplatesRetrieveParams.omit({ project_id: true })
+const WorkflowsShowEmailTemplateSchema = () => {
+ const MessagingTemplatesRetrieveParams = orvalSchemas.MessagingTemplatesRetrieveParams()
+ return MessagingTemplatesRetrieveParams.omit({ project_id: true })
+}
const workflowsShowEmailTemplate = (): ToolBase<
- typeof WorkflowsShowEmailTemplateSchema,
+ ReturnType<typeof WorkflowsShowEmailTemplateSchema>,
WithPostHogUrl<Schemas.MessageTemplate>
> =>
withUiApp('email-template', {
name: 'workflows-show-email-template',
- schema: WorkflowsShowEmailTemplateSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsShowEmailTemplateSchema>) => {
+ schema: WorkflowsShowEmailTemplateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsShowEmailTemplateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.MessageTemplate>({
method: 'GET',
@@ -151,17 +157,21 @@ const workflowsShowEmailTemplate = (): ToolBase<
},
})
-const WorkflowsUpdateEmailTemplateSchema = MessagingTemplatesPartialUpdateParams.omit({ project_id: true }).extend(
- MessagingTemplatesPartialUpdateBody.shape
-)
+const WorkflowsUpdateEmailTemplateSchema = () => {
+ const MessagingTemplatesPartialUpdateBody = orvalSchemas.MessagingTemplatesPartialUpdateBody()
+ const MessagingTemplatesPartialUpdateParams = orvalSchemas.MessagingTemplatesPartialUpdateParams()
+ return MessagingTemplatesPartialUpdateParams.omit({ project_id: true }).extend(
+ MessagingTemplatesPartialUpdateBody.shape
+ )
+}
const workflowsUpdateEmailTemplate = (): ToolBase<
- typeof WorkflowsUpdateEmailTemplateSchema,
+ ReturnType<typeof WorkflowsUpdateEmailTemplateSchema>,
WithPostHogUrl<Schemas.MessageTemplate>
> => ({
name: 'workflows-update-email-template',
- schema: WorkflowsUpdateEmailTemplateSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsUpdateEmailTemplateSchema>) => {
+ schema: WorkflowsUpdateEmailTemplateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsUpdateEmailTemplateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
diff --git a/services/mcp/src/tools/generated/endpoints.ts b/services/mcp/src/tools/generated/endpoints.ts
index 46e2dad828a4..f8747ea13dc1 100644
--- a/services/mcp/src/tools/generated/endpoints.ts
+++ b/services/mcp/src/tools/generated/endpoints.ts
@@ -2,44 +2,29 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- EndpointsCreateBody,
- EndpointsDestroyParams,
- EndpointsLastExecutionTimesCreateBody,
- EndpointsListQueryParams,
- EndpointsLogsRetrieveParams,
- EndpointsLogsRetrieveQueryParams,
- EndpointsMaterializationPreviewCreateBody,
- EndpointsMaterializationPreviewCreateParams,
- EndpointsMaterializationStatusRetrieveParams,
- EndpointsMaterializationSuggestionCreateBody,
- EndpointsMaterializationSuggestionCreateParams,
- EndpointsOpenapiSpecRetrieveParams,
- EndpointsOpenapiSpecRetrieveQueryParams,
- EndpointsPartialUpdateBody,
- EndpointsPartialUpdateParams,
- EndpointsRetrieveParams,
- EndpointsRunCreateBody,
- EndpointsRunCreateParams,
- EndpointsVersionsListParams,
- EndpointsVersionsListQueryParams,
-} from '@/generated/endpoints/api'
+import * as orvalSchemas from '@/generated/endpoints/api'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const EndpointCreateSchema = EndpointsCreateBody.omit({
- is_active: true,
- derived_from_insight: true,
- version: true,
- bucket_overrides: true,
- deleted: true,
- optional_breakdown_properties: true,
-})
+const EndpointCreateSchema = () => {
+ const EndpointsCreateBody = orvalSchemas.EndpointsCreateBody()
+ return EndpointsCreateBody.omit({
+ is_active: true,
+ derived_from_insight: true,
+ version: true,
+ bucket_overrides: true,
+ deleted: true,
+ optional_breakdown_properties: true,
+ })
+}
-const endpointCreate = (): ToolBase<typeof EndpointCreateSchema, WithPostHogUrl<Schemas.EndpointResponse>> => ({
+const endpointCreate = (): ToolBase<
+ ReturnType<typeof EndpointCreateSchema>,
+ WithPostHogUrl<Schemas.EndpointResponse>
+> => ({
name: 'endpoint-create',
- schema: EndpointCreateSchema,
- handler: async (context: Context, params: z.infer<typeof EndpointCreateSchema>) => {
+ schema: EndpointCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EndpointCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -69,12 +54,15 @@ const endpointCreate = (): ToolBase<typeof EndpointCreateSchema, WithPostHogUrl<
},
})
-const EndpointDeleteSchema = EndpointsDestroyParams.omit({ project_id: true })
+const EndpointDeleteSchema = () => {
+ const EndpointsDestroyParams = orvalSchemas.EndpointsDestroyParams()
+ return EndpointsDestroyParams.omit({ project_id: true })
+}
-const endpointDelete = (): ToolBase<typeof EndpointDeleteSchema, Schemas.EndpointResponse> => ({
+const endpointDelete = (): ToolBase<ReturnType<typeof EndpointDeleteSchema>, Schemas.EndpointResponse> => ({
name: 'endpoint-delete',
- schema: EndpointDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof EndpointDeleteSchema>) => {
+ schema: EndpointDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EndpointDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.EndpointResponse>({
method: 'PATCH',
@@ -85,12 +73,18 @@ const endpointDelete = (): ToolBase<typeof EndpointDeleteSchema, Schemas.Endpoin
},
})
-const EndpointGetSchema = EndpointsRetrieveParams.omit({ project_id: true })
+const EndpointGetSchema = () => {
+ const EndpointsRetrieveParams = orvalSchemas.EndpointsRetrieveParams()
+ return EndpointsRetrieveParams.omit({ project_id: true })
+}
-const endpointGet = (): ToolBase<typeof EndpointGetSchema, WithPostHogUrl<Schemas.EndpointVersionResponse>> => ({
+const endpointGet = (): ToolBase<
+ ReturnType<typeof EndpointGetSchema>,
+ WithPostHogUrl<Schemas.EndpointVersionResponse>
+> => ({
name: 'endpoint-get',
- schema: EndpointGetSchema,
- handler: async (context: Context, params: z.infer<typeof EndpointGetSchema>) => {
+ schema: EndpointGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EndpointGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.EndpointVersionResponse>({
method: 'GET',
@@ -100,14 +94,16 @@ const endpointGet = (): ToolBase<typeof EndpointGetSchema, WithPostHogUrl<Schema
},
})
-const EndpointLogsSchema = EndpointsLogsRetrieveParams.omit({ project_id: true }).extend(
- EndpointsLogsRetrieveQueryParams.shape
-)
+const EndpointLogsSchema = () => {
+ const EndpointsLogsRetrieveParams = orvalSchemas.EndpointsLogsRetrieveParams()
+ const EndpointsLogsRetrieveQueryParams = orvalSchemas.EndpointsLogsRetrieveQueryParams()
+ return EndpointsLogsRetrieveParams.omit({ project_id: true }).extend(EndpointsLogsRetrieveQueryParams.shape)
+}
-const endpointLogs = (): ToolBase<typeof EndpointLogsSchema, unknown> => ({
+const endpointLogs = (): ToolBase<ReturnType<typeof EndpointLogsSchema>, unknown> => ({
name: 'endpoint-logs',
- schema: EndpointLogsSchema,
- handler: async (context: Context, params: z.infer<typeof EndpointLogsSchema>) => {
+ schema: EndpointLogsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EndpointLogsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'GET',
@@ -125,16 +121,15 @@ const endpointLogs = (): ToolBase<typeof EndpointLogsSchema, unknown> => ({
},
})
-const EndpointMaterializationConditionsSchema = z.object({})
+const EndpointMaterializationConditionsSchema = () => z.object({})
const endpointMaterializationConditions = (): ToolBase<
- typeof EndpointMaterializationConditionsSchema,
+ ReturnType<typeof EndpointMaterializationConditionsSchema>,
Schemas.EndpointMaterializationConditions
> => ({
name: 'endpoint-materialization-conditions',
- schema: EndpointMaterializationConditionsSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof EndpointMaterializationConditionsSchema>) => {
+ schema: EndpointMaterializationConditionsSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof EndpointMaterializationConditionsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.EndpointMaterializationConditions>({
method: 'GET',
@@ -144,15 +139,18 @@ const endpointMaterializationConditions = (): ToolBase<
},
})
-const EndpointMaterializationStatusSchema = EndpointsMaterializationStatusRetrieveParams.omit({ project_id: true })
+const EndpointMaterializationStatusSchema = () => {
+ const EndpointsMaterializationStatusRetrieveParams = orvalSchemas.EndpointsMaterializationStatusRetrieveParams()
+ return EndpointsMaterializationStatusRetrieveParams.omit({ project_id: true })
+}
const endpointMaterializationStatus = (): ToolBase<
- typeof EndpointMaterializationStatusSchema,
+ ReturnType<typeof EndpointMaterializationStatusSchema>,
WithPostHogUrl<Schemas.EndpointMaterialization>
> => ({
name: 'endpoint-materialization-status',
- schema: EndpointMaterializationStatusSchema,
- handler: async (context: Context, params: z.infer<typeof EndpointMaterializationStatusSchema>) => {
+ schema: EndpointMaterializationStatusSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EndpointMaterializationStatusSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.EndpointMaterialization>({
method: 'GET',
@@ -162,17 +160,21 @@ const endpointMaterializationStatus = (): ToolBase<
},
})
-const EndpointMaterializationSuggestionSchema = EndpointsMaterializationSuggestionCreateParams.omit({
- project_id: true,
-}).extend(EndpointsMaterializationSuggestionCreateBody.shape)
+const EndpointMaterializationSuggestionSchema = () => {
+ const EndpointsMaterializationSuggestionCreateBody = orvalSchemas.EndpointsMaterializationSuggestionCreateBody()
+ const EndpointsMaterializationSuggestionCreateParams = orvalSchemas.EndpointsMaterializationSuggestionCreateParams()
+ return EndpointsMaterializationSuggestionCreateParams.omit({ project_id: true }).extend(
+ EndpointsMaterializationSuggestionCreateBody.shape
+ )
+}
const endpointMaterializationSuggestion = (): ToolBase<
- typeof EndpointMaterializationSuggestionSchema,
+ ReturnType<typeof EndpointMaterializationSuggestionSchema>,
WithPostHogUrl<Schemas.EndpointMaterializationSuggestion>
> => ({
name: 'endpoint-materialization-suggestion',
- schema: EndpointMaterializationSuggestionSchema,
- handler: async (context: Context, params: z.infer<typeof EndpointMaterializationSuggestionSchema>) => {
+ schema: EndpointMaterializationSuggestionSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EndpointMaterializationSuggestionSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.version !== undefined) {
@@ -187,14 +189,18 @@ const endpointMaterializationSuggestion = (): ToolBase<
},
})
-const EndpointOpenapiSpecSchema = EndpointsOpenapiSpecRetrieveParams.omit({ project_id: true }).extend(
- EndpointsOpenapiSpecRetrieveQueryParams.shape
-)
+const EndpointOpenapiSpecSchema = () => {
+ const EndpointsOpenapiSpecRetrieveParams = orvalSchemas.EndpointsOpenapiSpecRetrieveParams()
+ const EndpointsOpenapiSpecRetrieveQueryParams = orvalSchemas.EndpointsOpenapiSpecRetrieveQueryParams()
+ return EndpointsOpenapiSpecRetrieveParams.omit({ project_id: true }).extend(
+ EndpointsOpenapiSpecRetrieveQueryParams.shape
+ )
+}
-const endpointOpenapiSpec = (): ToolBase<typeof EndpointOpenapiSpecSchema, unknown> => ({
+const endpointOpenapiSpec = (): ToolBase<ReturnType<typeof EndpointOpenapiSpecSchema>, unknown> => ({
name: 'endpoint-openapi-spec',
- schema: EndpointOpenapiSpecSchema,
- handler: async (context: Context, params: z.infer<typeof EndpointOpenapiSpecSchema>) => {
+ schema: EndpointOpenapiSpecSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EndpointOpenapiSpecSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'GET',
@@ -207,20 +213,28 @@ const endpointOpenapiSpec = (): ToolBase<typeof EndpointOpenapiSpecSchema, unkno
},
})
-const EndpointRunSchema = EndpointsRunCreateParams.omit({ project_id: true })
- .extend(
- EndpointsRunCreateBody.omit({ client_query_id: true, debug: true, filters_override: true, version: true }).shape
- )
- .extend({
- variables: EndpointsRunCreateBody.shape['variables'].describe(
- 'Key-value pairs to parameterize the query. For HogQL endpoints, keys match variable code_name (e.g. {"event_name": "$pageview"}). For insight endpoints with breakdowns, use the breakdown property name as key.'
- ),
- })
+const EndpointRunSchema = () => {
+ const EndpointsRunCreateBody = orvalSchemas.EndpointsRunCreateBody()
+ const EndpointsRunCreateParams = orvalSchemas.EndpointsRunCreateParams()
+ return EndpointsRunCreateParams.omit({ project_id: true })
+ .extend(
+ EndpointsRunCreateBody.omit({ client_query_id: true, debug: true, filters_override: true, version: true })
+ .shape
+ )
+ .extend({
+ variables: EndpointsRunCreateBody.shape['variables'].describe(
+ 'Key-value pairs to parameterize the query. For HogQL endpoints, keys match variable code_name (e.g. {"event_name": "$pageview"}). For insight endpoints with breakdowns, use the breakdown property name as key.'
+ ),
+ })
+}
-const endpointRun = (): ToolBase<typeof EndpointRunSchema, WithPostHogUrl<Schemas.EndpointRunResponse>> => ({
+const endpointRun = (): ToolBase<
+ ReturnType<typeof EndpointRunSchema>,
+ WithPostHogUrl<Schemas.EndpointRunResponse>
+> => ({
name: 'endpoint-run',
- schema: EndpointRunSchema,
- handler: async (context: Context, params: z.infer<typeof EndpointRunSchema>) => {
+ schema: EndpointRunSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EndpointRunSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.limit !== undefined) {
@@ -244,20 +258,27 @@ const endpointRun = (): ToolBase<typeof EndpointRunSchema, WithPostHogUrl<Schema
},
})
-const EndpointUpdateSchema = EndpointsPartialUpdateParams.omit({ project_id: true }).extend(
- EndpointsPartialUpdateBody.omit({
- name: true,
- derived_from_insight: true,
- bucket_overrides: true,
- deleted: true,
- optional_breakdown_properties: true,
- }).shape
-)
+const EndpointUpdateSchema = () => {
+ const EndpointsPartialUpdateBody = orvalSchemas.EndpointsPartialUpdateBody()
+ const EndpointsPartialUpdateParams = orvalSchemas.EndpointsPartialUpdateParams()
+ return EndpointsPartialUpdateParams.omit({ project_id: true }).extend(
+ EndpointsPartialUpdateBody.omit({
+ name: true,
+ derived_from_insight: true,
+ bucket_overrides: true,
+ deleted: true,
+ optional_breakdown_properties: true,
+ }).shape
+ )
+}
-const endpointUpdate = (): ToolBase<typeof EndpointUpdateSchema, WithPostHogUrl<Schemas.EndpointResponse>> => ({
+const endpointUpdate = (): ToolBase<
+ ReturnType<typeof EndpointUpdateSchema>,
+ WithPostHogUrl<Schemas.EndpointResponse>
+> => ({
name: 'endpoint-update',
- schema: EndpointUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof EndpointUpdateSchema>) => {
+ schema: EndpointUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EndpointUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
@@ -290,17 +311,19 @@ const endpointUpdate = (): ToolBase<typeof EndpointUpdateSchema, WithPostHogUrl<
},
})
-const EndpointVersionsSchema = EndpointsVersionsListParams.omit({ project_id: true }).extend(
- EndpointsVersionsListQueryParams.shape
-)
+const EndpointVersionsSchema = () => {
+ const EndpointsVersionsListParams = orvalSchemas.EndpointsVersionsListParams()
+ const EndpointsVersionsListQueryParams = orvalSchemas.EndpointsVersionsListQueryParams()
+ return EndpointsVersionsListParams.omit({ project_id: true }).extend(EndpointsVersionsListQueryParams.shape)
+}
const endpointVersions = (): ToolBase<
- typeof EndpointVersionsSchema,
+ ReturnType<typeof EndpointVersionsSchema>,
WithPostHogUrl<Schemas.PaginatedEndpointVersionResponseList>
> => ({
name: 'endpoint-versions',
- schema: EndpointVersionsSchema,
- handler: async (context: Context, params: z.infer<typeof EndpointVersionsSchema>) => {
+ schema: EndpointVersionsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EndpointVersionsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedEndpointVersionResponseList>({
method: 'GET',
@@ -325,15 +348,18 @@ const endpointVersions = (): ToolBase<
},
})
-const EndpointsGetAllSchema = EndpointsListQueryParams
+const EndpointsGetAllSchema = () => {
+ const EndpointsListQueryParams = orvalSchemas.EndpointsListQueryParams()
+ return EndpointsListQueryParams
+}
const endpointsGetAll = (): ToolBase<
- typeof EndpointsGetAllSchema,
+ ReturnType<typeof EndpointsGetAllSchema>,
WithPostHogUrl<Schemas.PaginatedEndpointResponseList>
> => ({
name: 'endpoints-get-all',
- schema: EndpointsGetAllSchema,
- handler: async (context: Context, params: z.infer<typeof EndpointsGetAllSchema>) => {
+ schema: EndpointsGetAllSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EndpointsGetAllSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedEndpointResponseList>({
method: 'GET',
@@ -358,15 +384,18 @@ const endpointsGetAll = (): ToolBase<
},
})
-const EndpointsLastExecutionTimesSchema = EndpointsLastExecutionTimesCreateBody
+const EndpointsLastExecutionTimesSchema = () => {
+ const EndpointsLastExecutionTimesCreateBody = orvalSchemas.EndpointsLastExecutionTimesCreateBody()
+ return EndpointsLastExecutionTimesCreateBody
+}
const endpointsLastExecutionTimes = (): ToolBase<
- typeof EndpointsLastExecutionTimesSchema,
+ ReturnType<typeof EndpointsLastExecutionTimesSchema>,
Schemas.QueryStatusResponse
> => ({
name: 'endpoints-last-execution-times',
- schema: EndpointsLastExecutionTimesSchema,
- handler: async (context: Context, params: z.infer<typeof EndpointsLastExecutionTimesSchema>) => {
+ schema: EndpointsLastExecutionTimesSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EndpointsLastExecutionTimesSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.names !== undefined) {
@@ -381,14 +410,21 @@ const endpointsLastExecutionTimes = (): ToolBase<
},
})
-const EndpointsMaterializationPreviewSchema = EndpointsMaterializationPreviewCreateParams.omit({
- project_id: true,
-}).extend(EndpointsMaterializationPreviewCreateBody.shape)
+const EndpointsMaterializationPreviewSchema = () => {
+ const EndpointsMaterializationPreviewCreateBody = orvalSchemas.EndpointsMaterializationPreviewCreateBody()
+ const EndpointsMaterializationPreviewCreateParams = orvalSchemas.EndpointsMaterializationPreviewCreateParams()
+ return EndpointsMaterializationPreviewCreateParams.omit({ project_id: true }).extend(
+ EndpointsMaterializationPreviewCreateBody.shape
+ )
+}
-const endpointsMaterializationPreview = (): ToolBase<typeof EndpointsMaterializationPreviewSchema, unknown> => ({
+const endpointsMaterializationPreview = (): ToolBase<
+ ReturnType<typeof EndpointsMaterializationPreviewSchema>,
+ unknown
+> => ({
name: 'endpoints-materialization-preview',
- schema: EndpointsMaterializationPreviewSchema,
- handler: async (context: Context, params: z.infer<typeof EndpointsMaterializationPreviewSchema>) => {
+ schema: EndpointsMaterializationPreviewSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EndpointsMaterializationPreviewSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.version !== undefined) {
diff --git a/services/mcp/src/tools/generated/engineering_analytics.ts b/services/mcp/src/tools/generated/engineering_analytics.ts
index b77109dea833..65c21da61c08 100644
--- a/services/mcp/src/tools/generated/engineering_analytics.ts
+++ b/services/mcp/src/tools/generated/engineering_analytics.ts
@@ -2,31 +2,22 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- EngineeringAnalyticsBrokenTestsQueryParams,
- EngineeringAnalyticsCiFailureLogsQueryParams,
- EngineeringAnalyticsFlakyTestsQueryParams,
- EngineeringAnalyticsPrCostQueryParams,
- EngineeringAnalyticsPrLifecycleQueryParams,
- EngineeringAnalyticsPullRequestsQueryParams,
- EngineeringAnalyticsRunFailureLogsQueryParams,
- EngineeringAnalyticsTeamCiHealthQueryParams,
- EngineeringAnalyticsWorkflowHealthQueryParams,
- EngineeringAnalyticsWorkflowJobsQueryParams,
- EngineeringAnalyticsWorkflowRunnerCostsQueryParams,
-} from '@/generated/engineering_analytics/api'
+import * as orvalSchemas from '@/generated/engineering_analytics/api'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const EngineeringAnalyticsBrokenTestsSchema = EngineeringAnalyticsBrokenTestsQueryParams
+const EngineeringAnalyticsBrokenTestsSchema = () => {
+ const EngineeringAnalyticsBrokenTestsQueryParams = orvalSchemas.EngineeringAnalyticsBrokenTestsQueryParams()
+ return EngineeringAnalyticsBrokenTestsQueryParams
+}
const engineeringAnalyticsBrokenTests = (): ToolBase<
- typeof EngineeringAnalyticsBrokenTestsSchema,
+ ReturnType<typeof EngineeringAnalyticsBrokenTestsSchema>,
Schemas.BrokenTestsResult
> => ({
name: 'engineering-analytics-broken-tests',
- schema: EngineeringAnalyticsBrokenTestsSchema,
- handler: async (context: Context, params: z.infer<typeof EngineeringAnalyticsBrokenTestsSchema>) => {
+ schema: EngineeringAnalyticsBrokenTestsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EngineeringAnalyticsBrokenTestsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.BrokenTestsResult>({
method: 'GET',
@@ -40,15 +31,18 @@ const engineeringAnalyticsBrokenTests = (): ToolBase<
},
})
-const EngineeringAnalyticsCiFailureLogsSchema = EngineeringAnalyticsCiFailureLogsQueryParams
+const EngineeringAnalyticsCiFailureLogsSchema = () => {
+ const EngineeringAnalyticsCiFailureLogsQueryParams = orvalSchemas.EngineeringAnalyticsCiFailureLogsQueryParams()
+ return EngineeringAnalyticsCiFailureLogsQueryParams
+}
const engineeringAnalyticsCiFailureLogs = (): ToolBase<
- typeof EngineeringAnalyticsCiFailureLogsSchema,
+ ReturnType<typeof EngineeringAnalyticsCiFailureLogsSchema>,
Schemas.CIFailureLogs
> => ({
name: 'engineering-analytics-ci-failure-logs',
- schema: EngineeringAnalyticsCiFailureLogsSchema,
- handler: async (context: Context, params: z.infer<typeof EngineeringAnalyticsCiFailureLogsSchema>) => {
+ schema: EngineeringAnalyticsCiFailureLogsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EngineeringAnalyticsCiFailureLogsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.CIFailureLogs>({
method: 'GET',
@@ -63,15 +57,18 @@ const engineeringAnalyticsCiFailureLogs = (): ToolBase<
},
})
-const EngineeringAnalyticsFlakyTestsSchema = EngineeringAnalyticsFlakyTestsQueryParams
+const EngineeringAnalyticsFlakyTestsSchema = () => {
+ const EngineeringAnalyticsFlakyTestsQueryParams = orvalSchemas.EngineeringAnalyticsFlakyTestsQueryParams()
+ return EngineeringAnalyticsFlakyTestsQueryParams
+}
const engineeringAnalyticsFlakyTests = (): ToolBase<
- typeof EngineeringAnalyticsFlakyTestsSchema,
+ ReturnType<typeof EngineeringAnalyticsFlakyTestsSchema>,
WithPostHogUrl<Schemas.FlakyTestList>
> => ({
name: 'engineering-analytics-flaky-tests',
- schema: EngineeringAnalyticsFlakyTestsSchema,
- handler: async (context: Context, params: z.infer<typeof EngineeringAnalyticsFlakyTestsSchema>) => {
+ schema: EngineeringAnalyticsFlakyTestsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EngineeringAnalyticsFlakyTestsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.FlakyTestList>({
method: 'GET',
@@ -90,12 +87,18 @@ const engineeringAnalyticsFlakyTests = (): ToolBase<
},
})
-const EngineeringAnalyticsPrCostSchema = EngineeringAnalyticsPrCostQueryParams
+const EngineeringAnalyticsPrCostSchema = () => {
+ const EngineeringAnalyticsPrCostQueryParams = orvalSchemas.EngineeringAnalyticsPrCostQueryParams()
+ return EngineeringAnalyticsPrCostQueryParams
+}
-const engineeringAnalyticsPrCost = (): ToolBase<typeof EngineeringAnalyticsPrCostSchema, Schemas.PRCostSummary> => ({
+const engineeringAnalyticsPrCost = (): ToolBase<
+ ReturnType<typeof EngineeringAnalyticsPrCostSchema>,
+ Schemas.PRCostSummary
+> => ({
name: 'engineering-analytics-pr-cost',
- schema: EngineeringAnalyticsPrCostSchema,
- handler: async (context: Context, params: z.infer<typeof EngineeringAnalyticsPrCostSchema>) => {
+ schema: EngineeringAnalyticsPrCostSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EngineeringAnalyticsPrCostSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PRCostSummary>({
method: 'GET',
@@ -110,15 +113,18 @@ const engineeringAnalyticsPrCost = (): ToolBase<typeof EngineeringAnalyticsPrCos
},
})
-const EngineeringAnalyticsRunFailureLogsSchema = EngineeringAnalyticsRunFailureLogsQueryParams
+const EngineeringAnalyticsRunFailureLogsSchema = () => {
+ const EngineeringAnalyticsRunFailureLogsQueryParams = orvalSchemas.EngineeringAnalyticsRunFailureLogsQueryParams()
+ return EngineeringAnalyticsRunFailureLogsQueryParams
+}
const engineeringAnalyticsRunFailureLogs = (): ToolBase<
- typeof EngineeringAnalyticsRunFailureLogsSchema,
+ ReturnType<typeof EngineeringAnalyticsRunFailureLogsSchema>,
Schemas.RunFailureLogs
> => ({
name: 'engineering-analytics-run-failure-logs',
- schema: EngineeringAnalyticsRunFailureLogsSchema,
- handler: async (context: Context, params: z.infer<typeof EngineeringAnalyticsRunFailureLogsSchema>) => {
+ schema: EngineeringAnalyticsRunFailureLogsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EngineeringAnalyticsRunFailureLogsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.RunFailureLogs>({
method: 'GET',
@@ -133,16 +139,15 @@ const engineeringAnalyticsRunFailureLogs = (): ToolBase<
},
})
-const EngineeringAnalyticsSourcesSchema = z.object({})
+const EngineeringAnalyticsSourcesSchema = () => z.object({})
const engineeringAnalyticsSources = (): ToolBase<
- typeof EngineeringAnalyticsSourcesSchema,
+ ReturnType<typeof EngineeringAnalyticsSourcesSchema>,
WithPostHogUrl<Schemas.GitHubSource[]>
> => ({
name: 'engineering-analytics-sources',
- schema: EngineeringAnalyticsSourcesSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof EngineeringAnalyticsSourcesSchema>) => {
+ schema: EngineeringAnalyticsSourcesSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof EngineeringAnalyticsSourcesSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.GitHubSource[]>({
method: 'GET',
@@ -152,15 +157,18 @@ const engineeringAnalyticsSources = (): ToolBase<
},
})
-const EngineeringAnalyticsTeamCiHealthSchema = EngineeringAnalyticsTeamCiHealthQueryParams
+const EngineeringAnalyticsTeamCiHealthSchema = () => {
+ const EngineeringAnalyticsTeamCiHealthQueryParams = orvalSchemas.EngineeringAnalyticsTeamCiHealthQueryParams()
+ return EngineeringAnalyticsTeamCiHealthQueryParams
+}
const engineeringAnalyticsTeamCiHealth = (): ToolBase<
- typeof EngineeringAnalyticsTeamCiHealthSchema,
+ ReturnType<typeof EngineeringAnalyticsTeamCiHealthSchema>,
WithPostHogUrl<Schemas.TeamCIHealthList>
> => ({
name: 'engineering-analytics-team-ci-health',
- schema: EngineeringAnalyticsTeamCiHealthSchema,
- handler: async (context: Context, params: z.infer<typeof EngineeringAnalyticsTeamCiHealthSchema>) => {
+ schema: EngineeringAnalyticsTeamCiHealthSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EngineeringAnalyticsTeamCiHealthSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.TeamCIHealthList>({
method: 'GET',
@@ -178,15 +186,18 @@ const engineeringAnalyticsTeamCiHealth = (): ToolBase<
},
})
-const EngineeringAnalyticsWorkflowJobsSchema = EngineeringAnalyticsWorkflowJobsQueryParams
+const EngineeringAnalyticsWorkflowJobsSchema = () => {
+ const EngineeringAnalyticsWorkflowJobsQueryParams = orvalSchemas.EngineeringAnalyticsWorkflowJobsQueryParams()
+ return EngineeringAnalyticsWorkflowJobsQueryParams
+}
const engineeringAnalyticsWorkflowJobs = (): ToolBase<
- typeof EngineeringAnalyticsWorkflowJobsSchema,
+ ReturnType<typeof EngineeringAnalyticsWorkflowJobsSchema>,
WithPostHogUrl<Schemas.WorkflowJob[]>
> => ({
name: 'engineering-analytics-workflow-jobs',
- schema: EngineeringAnalyticsWorkflowJobsSchema,
- handler: async (context: Context, params: z.infer<typeof EngineeringAnalyticsWorkflowJobsSchema>) => {
+ schema: EngineeringAnalyticsWorkflowJobsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof EngineeringAnalyticsWorkflowJobsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.WorkflowJob[]>({
method: 'GET',
@@ -202,15 +213,22 @@ const engineeringAnalyticsWorkflowJobs = (): ToolBase<
},
})
-const EngineeringAnalyticsWorkflowRunnerCostsSchema = EngineeringAnalyticsWorkflowRunnerCostsQueryParams
+const EngineeringAnalyticsWorkflowRunnerCostsSchema = () => {
+ const EngineeringAnalyticsWorkflowRunnerCostsQueryParams =
+ orvalSchemas.EngineeringAnalyticsWorkflowRunnerCostsQueryParams()
+ return EngineeringAnalyticsWorkflowRunnerCostsQueryParams
+}
const engineeringAnalyticsWorkflowRunnerCosts = (): ToolBase<
- typeof EngineeringAnalyticsWorkflowRunnerCostsSchema,
+ ReturnType<typeof EngineeringAnalyticsWorkflowRunnerCostsSchema>,
WithPostHogUrl<Schemas.WorkflowRunnerCost[]>
> => ({
name: 'engineering-analytics-workflow-runner-costs',
- schema: EngineeringAnalyticsWorkflowRunnerCostsSchema,
- handler: async (context: Context, params: z.infer<typeof EngineeringAnalyticsWorkflowRunnerCostsSchema>) => {
+ schema: EngineeringAnalyticsWorkflowRunnerCostsSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof EngineeringAnalyticsWorkflowRunnerCostsSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.WorkflowRunnerCost[]>({
method: 'GET',
@@ -228,12 +246,15 @@ const engineeringAnalyticsWorkflowRunnerCosts = (): ToolBase<
},
})
-const PrLifecycleSchema = EngineeringAnalyticsPrLifecycleQueryParams
+const PrLifecycleSchema = () => {
+ const EngineeringAnalyticsPrLifecycleQueryParams = orvalSchemas.EngineeringAnalyticsPrLifecycleQueryParams()
+ return EngineeringAnalyticsPrLifecycleQueryParams
+}
-const prLifecycle = (): ToolBase<typeof PrLifecycleSchema, Schemas.PRLifecycle> => ({
+const prLifecycle = (): ToolBase<ReturnType<typeof PrLifecycleSchema>, Schemas.PRLifecycle> => ({
name: 'pr-lifecycle',
- schema: PrLifecycleSchema,
- handler: async (context: Context, params: z.infer<typeof PrLifecycleSchema>) => {
+ schema: PrLifecycleSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof PrLifecycleSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PRLifecycle>({
method: 'GET',
@@ -248,16 +269,19 @@ const prLifecycle = (): ToolBase<typeof PrLifecycleSchema, Schemas.PRLifecycle>
},
})
-const PullRequestsSchema = EngineeringAnalyticsPullRequestsQueryParams.extend({
- date_from: EngineeringAnalyticsPullRequestsQueryParams.shape['date_from'].describe(
- "Recency floor for merged/closed PRs — relative ('-30d', '-8w') or ISO8601. Open PRs are always included regardless of age. Defaults to -30d."
- ),
-})
+const PullRequestsSchema = () => {
+ const EngineeringAnalyticsPullRequestsQueryParams = orvalSchemas.EngineeringAnalyticsPullRequestsQueryParams()
+ return EngineeringAnalyticsPullRequestsQueryParams.extend({
+ date_from: EngineeringAnalyticsPullRequestsQueryParams.shape['date_from'].describe(
+ "Recency floor for merged/closed PRs — relative ('-30d', '-8w') or ISO8601. Open PRs are always included regardless of age. Defaults to -30d."
+ ),
+ })
+}
-const pullRequests = (): ToolBase<typeof PullRequestsSchema, WithPostHogUrl<Schemas.PullRequestList>> => ({
+const pullRequests = (): ToolBase<ReturnType<typeof PullRequestsSchema>, WithPostHogUrl<Schemas.PullRequestList>> => ({
name: 'pull-requests',
- schema: PullRequestsSchema,
- handler: async (context: Context, params: z.infer<typeof PullRequestsSchema>) => {
+ schema: PullRequestsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof PullRequestsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PullRequestList>({
method: 'GET',
@@ -273,22 +297,28 @@ const pullRequests = (): ToolBase<typeof PullRequestsSchema, WithPostHogUrl<Sche
},
})
-const WorkflowHealthSchema = EngineeringAnalyticsWorkflowHealthQueryParams.extend({
- date_from: EngineeringAnalyticsWorkflowHealthQueryParams.shape['date_from'].describe(
- "Window start — relative ('-24h', '-7d') or ISO8601. Defaults to -24h."
- ),
- date_to: EngineeringAnalyticsWorkflowHealthQueryParams.shape['date_to'].describe(
- 'Window end — relative or ISO8601. Defaults to now.'
- ),
- run_scope: EngineeringAnalyticsWorkflowHealthQueryParams.shape['run_scope'].describe(
- 'Run scope. Use "pull_request" for PR CI runs (excludes default-branch master/main runs; same-repo PRs only, since fork PRs carry no PR attribution); omit or pass "all" for every run.'
- ),
-})
+const WorkflowHealthSchema = () => {
+ const EngineeringAnalyticsWorkflowHealthQueryParams = orvalSchemas.EngineeringAnalyticsWorkflowHealthQueryParams()
+ return EngineeringAnalyticsWorkflowHealthQueryParams.extend({
+ date_from: EngineeringAnalyticsWorkflowHealthQueryParams.shape['date_from'].describe(
+ "Window start — relative ('-24h', '-7d') or ISO8601. Defaults to -24h."
+ ),
+ date_to: EngineeringAnalyticsWorkflowHealthQueryParams.shape['date_to'].describe(
+ 'Window end — relative or ISO8601. Defaults to now.'
+ ),
+ run_scope: EngineeringAnalyticsWorkflowHealthQueryParams.shape['run_scope'].describe(
+ 'Run scope. Use "pull_request" for PR CI runs (excludes default-branch master/main runs; same-repo PRs only, since fork PRs carry no PR attribution); omit or pass "all" for every run.'
+ ),
+ })
+}
-const workflowHealth = (): ToolBase<typeof WorkflowHealthSchema, WithPostHogUrl<Schemas.WorkflowHealthItem[]>> => ({
+const workflowHealth = (): ToolBase<
+ ReturnType<typeof WorkflowHealthSchema>,
+ WithPostHogUrl<Schemas.WorkflowHealthItem[]>
+> => ({
name: 'workflow-health',
- schema: WorkflowHealthSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowHealthSchema>) => {
+ schema: WorkflowHealthSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowHealthSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.WorkflowHealthItem[]>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/error_tracking.ts b/services/mcp/src/tools/generated/error_tracking.ts
index cd9f2a163431..19ab8ac0ebaf 100644
--- a/services/mcp/src/tools/generated/error_tracking.ts
+++ b/services/mcp/src/tools/generated/error_tracking.ts
@@ -2,54 +2,23 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- ErrorTrackingAssignmentRulesCreateBody,
- ErrorTrackingAssignmentRulesListQueryParams,
- ErrorTrackingBypassRulesCreateBody,
- ErrorTrackingBypassRulesListQueryParams,
- ErrorTrackingBypassRulesUpdateBody,
- ErrorTrackingBypassRulesUpdateParams,
- ErrorTrackingExternalReferencesCreateBody,
- ErrorTrackingGroupingRulesCreateBody,
- ErrorTrackingGroupingRulesUpdateBody,
- ErrorTrackingGroupingRulesUpdateParams,
- ErrorTrackingIssuesAssignPartialUpdateBody,
- ErrorTrackingIssuesAssignPartialUpdateParams,
- ErrorTrackingIssuesMergeCreateBody,
- ErrorTrackingIssuesMergeCreateParams,
- ErrorTrackingIssuesPartialUpdateBody,
- ErrorTrackingIssuesPartialUpdateParams,
- ErrorTrackingIssuesSplitCreateBody,
- ErrorTrackingIssuesSplitCreateParams,
- ErrorTrackingQueryIssueCreateBody,
- ErrorTrackingQueryIssueEventsCreateBody,
- ErrorTrackingQueryIssuesListCreateBody,
- ErrorTrackingRecommendationsListQueryParams,
- ErrorTrackingSettingsUpdateSettingsPartialUpdateBody,
- ErrorTrackingSeverityRulesCreateBody,
- ErrorTrackingSeverityRulesUpdateBody,
- ErrorTrackingSeverityRulesUpdateParams,
- ErrorTrackingSuppressionRulesCreateBody,
- ErrorTrackingSuppressionRulesListQueryParams,
- ErrorTrackingSuppressionRulesUpdateBody,
- ErrorTrackingSuppressionRulesUpdateParams,
- ErrorTrackingSymbolSetsDownloadRetrieveParams,
- ErrorTrackingSymbolSetsListQueryParams,
- ErrorTrackingSymbolSetsRetrieveParams,
-} from '@/generated/error_tracking/api'
+import * as orvalSchemas from '@/generated/error_tracking/api'
import { withUiApp } from '@/resources/ui-apps'
import { withPostHogUrl, pickResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const ErrorTrackingAssignmentRulesCreateSchema = ErrorTrackingAssignmentRulesCreateBody
+const ErrorTrackingAssignmentRulesCreateSchema = () => {
+ const ErrorTrackingAssignmentRulesCreateBody = orvalSchemas.ErrorTrackingAssignmentRulesCreateBody()
+ return ErrorTrackingAssignmentRulesCreateBody
+}
const errorTrackingAssignmentRulesCreate = (): ToolBase<
- typeof ErrorTrackingAssignmentRulesCreateSchema,
+ ReturnType<typeof ErrorTrackingAssignmentRulesCreateSchema>,
Schemas.ErrorTrackingAssignmentRule
> => ({
name: 'error-tracking-assignment-rules-create',
- schema: ErrorTrackingAssignmentRulesCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingAssignmentRulesCreateSchema>) => {
+ schema: ErrorTrackingAssignmentRulesCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingAssignmentRulesCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.filters !== undefined) {
@@ -70,15 +39,18 @@ const errorTrackingAssignmentRulesCreate = (): ToolBase<
},
})
-const ErrorTrackingAssignmentRulesListSchema = ErrorTrackingAssignmentRulesListQueryParams
+const ErrorTrackingAssignmentRulesListSchema = () => {
+ const ErrorTrackingAssignmentRulesListQueryParams = orvalSchemas.ErrorTrackingAssignmentRulesListQueryParams()
+ return ErrorTrackingAssignmentRulesListQueryParams
+}
const errorTrackingAssignmentRulesList = (): ToolBase<
- typeof ErrorTrackingAssignmentRulesListSchema,
+ ReturnType<typeof ErrorTrackingAssignmentRulesListSchema>,
Schemas.PaginatedErrorTrackingAssignmentRuleList
> => ({
name: 'error-tracking-assignment-rules-list',
- schema: ErrorTrackingAssignmentRulesListSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingAssignmentRulesListSchema>) => {
+ schema: ErrorTrackingAssignmentRulesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingAssignmentRulesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedErrorTrackingAssignmentRuleList>({
method: 'GET',
@@ -92,15 +64,18 @@ const errorTrackingAssignmentRulesList = (): ToolBase<
},
})
-const ErrorTrackingBypassRulesCreateSchema = ErrorTrackingBypassRulesCreateBody
+const ErrorTrackingBypassRulesCreateSchema = () => {
+ const ErrorTrackingBypassRulesCreateBody = orvalSchemas.ErrorTrackingBypassRulesCreateBody()
+ return ErrorTrackingBypassRulesCreateBody
+}
const errorTrackingBypassRulesCreate = (): ToolBase<
- typeof ErrorTrackingBypassRulesCreateSchema,
+ ReturnType<typeof ErrorTrackingBypassRulesCreateSchema>,
Schemas.ErrorTrackingBypassRule
> => ({
name: 'error-tracking-bypass-rules-create',
- schema: ErrorTrackingBypassRulesCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingBypassRulesCreateSchema>) => {
+ schema: ErrorTrackingBypassRulesCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingBypassRulesCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.filters !== undefined) {
@@ -115,15 +90,18 @@ const errorTrackingBypassRulesCreate = (): ToolBase<
},
})
-const ErrorTrackingBypassRulesListSchema = ErrorTrackingBypassRulesListQueryParams
+const ErrorTrackingBypassRulesListSchema = () => {
+ const ErrorTrackingBypassRulesListQueryParams = orvalSchemas.ErrorTrackingBypassRulesListQueryParams()
+ return ErrorTrackingBypassRulesListQueryParams
+}
const errorTrackingBypassRulesList = (): ToolBase<
- typeof ErrorTrackingBypassRulesListSchema,
+ ReturnType<typeof ErrorTrackingBypassRulesListSchema>,
Schemas.PaginatedErrorTrackingBypassRuleList
> => ({
name: 'error-tracking-bypass-rules-list',
- schema: ErrorTrackingBypassRulesListSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingBypassRulesListSchema>) => {
+ schema: ErrorTrackingBypassRulesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingBypassRulesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedErrorTrackingBypassRuleList>({
method: 'GET',
@@ -137,14 +115,21 @@ const errorTrackingBypassRulesList = (): ToolBase<
},
})
-const ErrorTrackingBypassRulesUpdateSchema = ErrorTrackingBypassRulesUpdateParams.omit({ project_id: true }).extend(
- ErrorTrackingBypassRulesUpdateBody.shape
-)
+const ErrorTrackingBypassRulesUpdateSchema = () => {
+ const ErrorTrackingBypassRulesUpdateBody = orvalSchemas.ErrorTrackingBypassRulesUpdateBody()
+ const ErrorTrackingBypassRulesUpdateParams = orvalSchemas.ErrorTrackingBypassRulesUpdateParams()
+ return ErrorTrackingBypassRulesUpdateParams.omit({ project_id: true }).extend(
+ ErrorTrackingBypassRulesUpdateBody.shape
+ )
+}
-const errorTrackingBypassRulesUpdate = (): ToolBase<typeof ErrorTrackingBypassRulesUpdateSchema, unknown> => ({
+const errorTrackingBypassRulesUpdate = (): ToolBase<
+ ReturnType<typeof ErrorTrackingBypassRulesUpdateSchema>,
+ unknown
+> => ({
name: 'error-tracking-bypass-rules-update',
- schema: ErrorTrackingBypassRulesUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingBypassRulesUpdateSchema>) => {
+ schema: ErrorTrackingBypassRulesUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingBypassRulesUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.filters !== undefined) {
@@ -159,15 +144,21 @@ const errorTrackingBypassRulesUpdate = (): ToolBase<typeof ErrorTrackingBypassRu
},
})
-const ErrorTrackingExternalReferencesCreateSchema = ErrorTrackingExternalReferencesCreateBody
+const ErrorTrackingExternalReferencesCreateSchema = () => {
+ const ErrorTrackingExternalReferencesCreateBody = orvalSchemas.ErrorTrackingExternalReferencesCreateBody()
+ return ErrorTrackingExternalReferencesCreateBody
+}
const errorTrackingExternalReferencesCreate = (): ToolBase<
- typeof ErrorTrackingExternalReferencesCreateSchema,
+ ReturnType<typeof ErrorTrackingExternalReferencesCreateSchema>,
Schemas.ErrorTrackingExternalReferenceResult
> => ({
name: 'error-tracking-external-references-create',
- schema: ErrorTrackingExternalReferencesCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingExternalReferencesCreateSchema>) => {
+ schema: ErrorTrackingExternalReferencesCreateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ErrorTrackingExternalReferencesCreateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.integration_id !== undefined) {
@@ -188,15 +179,18 @@ const errorTrackingExternalReferencesCreate = (): ToolBase<
},
})
-const ErrorTrackingGroupingRulesCreateSchema = ErrorTrackingGroupingRulesCreateBody
+const ErrorTrackingGroupingRulesCreateSchema = () => {
+ const ErrorTrackingGroupingRulesCreateBody = orvalSchemas.ErrorTrackingGroupingRulesCreateBody()
+ return ErrorTrackingGroupingRulesCreateBody
+}
const errorTrackingGroupingRulesCreate = (): ToolBase<
- typeof ErrorTrackingGroupingRulesCreateSchema,
+ ReturnType<typeof ErrorTrackingGroupingRulesCreateSchema>,
Schemas.ErrorTrackingGroupingRule
> => ({
name: 'error-tracking-grouping-rules-create',
- schema: ErrorTrackingGroupingRulesCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingGroupingRulesCreateSchema>) => {
+ schema: ErrorTrackingGroupingRulesCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingGroupingRulesCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.filters !== undefined) {
@@ -217,16 +211,15 @@ const errorTrackingGroupingRulesCreate = (): ToolBase<
},
})
-const ErrorTrackingGroupingRulesListSchema = z.object({})
+const ErrorTrackingGroupingRulesListSchema = () => z.object({})
const errorTrackingGroupingRulesList = (): ToolBase<
- typeof ErrorTrackingGroupingRulesListSchema,
+ ReturnType<typeof ErrorTrackingGroupingRulesListSchema>,
Schemas.ErrorTrackingGroupingRuleListResponse
> => ({
name: 'error-tracking-grouping-rules-list',
- schema: ErrorTrackingGroupingRulesListSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingGroupingRulesListSchema>) => {
+ schema: ErrorTrackingGroupingRulesListSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof ErrorTrackingGroupingRulesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ErrorTrackingGroupingRuleListResponse>({
method: 'GET',
@@ -236,14 +229,21 @@ const errorTrackingGroupingRulesList = (): ToolBase<
},
})
-const ErrorTrackingGroupingRulesUpdateSchema = ErrorTrackingGroupingRulesUpdateParams.omit({ project_id: true }).extend(
- ErrorTrackingGroupingRulesUpdateBody.shape
-)
+const ErrorTrackingGroupingRulesUpdateSchema = () => {
+ const ErrorTrackingGroupingRulesUpdateBody = orvalSchemas.ErrorTrackingGroupingRulesUpdateBody()
+ const ErrorTrackingGroupingRulesUpdateParams = orvalSchemas.ErrorTrackingGroupingRulesUpdateParams()
+ return ErrorTrackingGroupingRulesUpdateParams.omit({ project_id: true }).extend(
+ ErrorTrackingGroupingRulesUpdateBody.shape
+ )
+}
-const errorTrackingGroupingRulesUpdate = (): ToolBase<typeof ErrorTrackingGroupingRulesUpdateSchema, unknown> => ({
+const errorTrackingGroupingRulesUpdate = (): ToolBase<
+ ReturnType<typeof ErrorTrackingGroupingRulesUpdateSchema>,
+ unknown
+> => ({
name: 'error-tracking-grouping-rules-update',
- schema: ErrorTrackingGroupingRulesUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingGroupingRulesUpdateSchema>) => {
+ schema: ErrorTrackingGroupingRulesUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingGroupingRulesUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.filters !== undefined) {
@@ -258,17 +258,24 @@ const errorTrackingGroupingRulesUpdate = (): ToolBase<typeof ErrorTrackingGroupi
},
})
-const ErrorTrackingIssuesAssignPartialUpdateSchema = ErrorTrackingIssuesAssignPartialUpdateParams.omit({
- project_id: true,
-}).extend(ErrorTrackingIssuesAssignPartialUpdateBody.shape)
+const ErrorTrackingIssuesAssignPartialUpdateSchema = () => {
+ const ErrorTrackingIssuesAssignPartialUpdateBody = orvalSchemas.ErrorTrackingIssuesAssignPartialUpdateBody()
+ const ErrorTrackingIssuesAssignPartialUpdateParams = orvalSchemas.ErrorTrackingIssuesAssignPartialUpdateParams()
+ return ErrorTrackingIssuesAssignPartialUpdateParams.omit({ project_id: true }).extend(
+ ErrorTrackingIssuesAssignPartialUpdateBody.shape
+ )
+}
const errorTrackingIssuesAssignPartialUpdate = (): ToolBase<
- typeof ErrorTrackingIssuesAssignPartialUpdateSchema,
+ ReturnType<typeof ErrorTrackingIssuesAssignPartialUpdateSchema>,
Schemas.ErrorTrackingIssueAssignResponse
> => ({
name: 'error-tracking-issues-assign-partial-update',
- schema: ErrorTrackingIssuesAssignPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingIssuesAssignPartialUpdateSchema>) => {
+ schema: ErrorTrackingIssuesAssignPartialUpdateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ErrorTrackingIssuesAssignPartialUpdateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.assignee !== undefined) {
@@ -283,17 +290,21 @@ const errorTrackingIssuesAssignPartialUpdate = (): ToolBase<
},
})
-const ErrorTrackingIssuesMergeCreateSchema = ErrorTrackingIssuesMergeCreateParams.omit({ project_id: true }).extend(
- ErrorTrackingIssuesMergeCreateBody.shape
-)
+const ErrorTrackingIssuesMergeCreateSchema = () => {
+ const ErrorTrackingIssuesMergeCreateBody = orvalSchemas.ErrorTrackingIssuesMergeCreateBody()
+ const ErrorTrackingIssuesMergeCreateParams = orvalSchemas.ErrorTrackingIssuesMergeCreateParams()
+ return ErrorTrackingIssuesMergeCreateParams.omit({ project_id: true }).extend(
+ ErrorTrackingIssuesMergeCreateBody.shape
+ )
+}
const errorTrackingIssuesMergeCreate = (): ToolBase<
- typeof ErrorTrackingIssuesMergeCreateSchema,
+ ReturnType<typeof ErrorTrackingIssuesMergeCreateSchema>,
Schemas.ErrorTrackingIssueMergeResponse
> => ({
name: 'error-tracking-issues-merge-create',
- schema: ErrorTrackingIssuesMergeCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingIssuesMergeCreateSchema>) => {
+ schema: ErrorTrackingIssuesMergeCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingIssuesMergeCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.ids !== undefined) {
@@ -308,18 +319,25 @@ const errorTrackingIssuesMergeCreate = (): ToolBase<
},
})
-const ErrorTrackingIssuesPartialUpdateSchema = ErrorTrackingIssuesPartialUpdateParams.omit({ project_id: true }).extend(
- ErrorTrackingIssuesPartialUpdateBody.shape
-)
+const ErrorTrackingIssuesPartialUpdateSchema = () => {
+ const ErrorTrackingIssuesPartialUpdateBody = orvalSchemas.ErrorTrackingIssuesPartialUpdateBody()
+ const ErrorTrackingIssuesPartialUpdateParams = orvalSchemas.ErrorTrackingIssuesPartialUpdateParams()
+ return ErrorTrackingIssuesPartialUpdateParams.omit({ project_id: true }).extend(
+ ErrorTrackingIssuesPartialUpdateBody.shape
+ )
+}
const errorTrackingIssuesPartialUpdate = (): ToolBase<
- typeof ErrorTrackingIssuesPartialUpdateSchema,
+ ReturnType<typeof ErrorTrackingIssuesPartialUpdateSchema>,
WithPostHogUrl<Schemas.ErrorTrackingIssueRead>
> =>
withUiApp('error-issue', {
name: 'error-tracking-issues-partial-update',
- schema: ErrorTrackingIssuesPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingIssuesPartialUpdateSchema>) => {
+ schema: ErrorTrackingIssuesPartialUpdateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ErrorTrackingIssuesPartialUpdateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.status !== undefined) {
@@ -343,17 +361,21 @@ const errorTrackingIssuesPartialUpdate = (): ToolBase<
},
})
-const ErrorTrackingIssuesSplitCreateSchema = ErrorTrackingIssuesSplitCreateParams.omit({ project_id: true }).extend(
- ErrorTrackingIssuesSplitCreateBody.shape
-)
+const ErrorTrackingIssuesSplitCreateSchema = () => {
+ const ErrorTrackingIssuesSplitCreateBody = orvalSchemas.ErrorTrackingIssuesSplitCreateBody()
+ const ErrorTrackingIssuesSplitCreateParams = orvalSchemas.ErrorTrackingIssuesSplitCreateParams()
+ return ErrorTrackingIssuesSplitCreateParams.omit({ project_id: true }).extend(
+ ErrorTrackingIssuesSplitCreateBody.shape
+ )
+}
const errorTrackingIssuesSplitCreate = (): ToolBase<
- typeof ErrorTrackingIssuesSplitCreateSchema,
+ ReturnType<typeof ErrorTrackingIssuesSplitCreateSchema>,
Schemas.ErrorTrackingIssueSplitResponse
> => ({
name: 'error-tracking-issues-split-create',
- schema: ErrorTrackingIssuesSplitCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingIssuesSplitCreateSchema>) => {
+ schema: ErrorTrackingIssuesSplitCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingIssuesSplitCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.fingerprints !== undefined) {
@@ -368,15 +390,18 @@ const errorTrackingIssuesSplitCreate = (): ToolBase<
},
})
-const ErrorTrackingRecommendationsListSchema = ErrorTrackingRecommendationsListQueryParams
+const ErrorTrackingRecommendationsListSchema = () => {
+ const ErrorTrackingRecommendationsListQueryParams = orvalSchemas.ErrorTrackingRecommendationsListQueryParams()
+ return ErrorTrackingRecommendationsListQueryParams
+}
const errorTrackingRecommendationsList = (): ToolBase<
- typeof ErrorTrackingRecommendationsListSchema,
+ ReturnType<typeof ErrorTrackingRecommendationsListSchema>,
Schemas.PaginatedErrorTrackingRecommendationList
> => ({
name: 'error-tracking-recommendations-list',
- schema: ErrorTrackingRecommendationsListSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingRecommendationsListSchema>) => {
+ schema: ErrorTrackingRecommendationsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingRecommendationsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedErrorTrackingRecommendationList>({
method: 'GET',
@@ -390,16 +415,15 @@ const errorTrackingRecommendationsList = (): ToolBase<
},
})
-const ErrorTrackingSettingsGetSchema = z.object({})
+const ErrorTrackingSettingsGetSchema = () => z.object({})
const errorTrackingSettingsGet = (): ToolBase<
- typeof ErrorTrackingSettingsGetSchema,
+ ReturnType<typeof ErrorTrackingSettingsGetSchema>,
Schemas.ErrorTrackingSettings
> => ({
name: 'error-tracking-settings-get',
- schema: ErrorTrackingSettingsGetSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingSettingsGetSchema>) => {
+ schema: ErrorTrackingSettingsGetSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof ErrorTrackingSettingsGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ErrorTrackingSettings>({
method: 'GET',
@@ -409,15 +433,19 @@ const errorTrackingSettingsGet = (): ToolBase<
},
})
-const ErrorTrackingSettingsUpdateSchema = ErrorTrackingSettingsUpdateSettingsPartialUpdateBody
+const ErrorTrackingSettingsUpdateSchema = () => {
+ const ErrorTrackingSettingsUpdateSettingsPartialUpdateBody =
+ orvalSchemas.ErrorTrackingSettingsUpdateSettingsPartialUpdateBody()
+ return ErrorTrackingSettingsUpdateSettingsPartialUpdateBody
+}
const errorTrackingSettingsUpdate = (): ToolBase<
- typeof ErrorTrackingSettingsUpdateSchema,
+ ReturnType<typeof ErrorTrackingSettingsUpdateSchema>,
Schemas.ErrorTrackingSettings
> => ({
name: 'error-tracking-settings-update',
- schema: ErrorTrackingSettingsUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingSettingsUpdateSchema>) => {
+ schema: ErrorTrackingSettingsUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingSettingsUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.project_rate_limit_value !== undefined) {
@@ -441,15 +469,18 @@ const errorTrackingSettingsUpdate = (): ToolBase<
},
})
-const ErrorTrackingSeverityRulesCreateSchema = ErrorTrackingSeverityRulesCreateBody
+const ErrorTrackingSeverityRulesCreateSchema = () => {
+ const ErrorTrackingSeverityRulesCreateBody = orvalSchemas.ErrorTrackingSeverityRulesCreateBody()
+ return ErrorTrackingSeverityRulesCreateBody
+}
const errorTrackingSeverityRulesCreate = (): ToolBase<
- typeof ErrorTrackingSeverityRulesCreateSchema,
+ ReturnType<typeof ErrorTrackingSeverityRulesCreateSchema>,
Schemas.ErrorTrackingSeverityRule
> => ({
name: 'error-tracking-severity-rules-create',
- schema: ErrorTrackingSeverityRulesCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingSeverityRulesCreateSchema>) => {
+ schema: ErrorTrackingSeverityRulesCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingSeverityRulesCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.filters !== undefined) {
@@ -470,16 +501,15 @@ const errorTrackingSeverityRulesCreate = (): ToolBase<
},
})
-const ErrorTrackingSeverityRulesListSchema = z.object({})
+const ErrorTrackingSeverityRulesListSchema = () => z.object({})
const errorTrackingSeverityRulesList = (): ToolBase<
- typeof ErrorTrackingSeverityRulesListSchema,
+ ReturnType<typeof ErrorTrackingSeverityRulesListSchema>,
Schemas.ErrorTrackingSeverityRuleListResponse
> => ({
name: 'error-tracking-severity-rules-list',
- schema: ErrorTrackingSeverityRulesListSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingSeverityRulesListSchema>) => {
+ schema: ErrorTrackingSeverityRulesListSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof ErrorTrackingSeverityRulesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ErrorTrackingSeverityRuleListResponse>({
method: 'GET',
@@ -489,14 +519,21 @@ const errorTrackingSeverityRulesList = (): ToolBase<
},
})
-const ErrorTrackingSeverityRulesUpdateSchema = ErrorTrackingSeverityRulesUpdateParams.omit({ project_id: true }).extend(
- ErrorTrackingSeverityRulesUpdateBody.shape
-)
+const ErrorTrackingSeverityRulesUpdateSchema = () => {
+ const ErrorTrackingSeverityRulesUpdateBody = orvalSchemas.ErrorTrackingSeverityRulesUpdateBody()
+ const ErrorTrackingSeverityRulesUpdateParams = orvalSchemas.ErrorTrackingSeverityRulesUpdateParams()
+ return ErrorTrackingSeverityRulesUpdateParams.omit({ project_id: true }).extend(
+ ErrorTrackingSeverityRulesUpdateBody.shape
+ )
+}
-const errorTrackingSeverityRulesUpdate = (): ToolBase<typeof ErrorTrackingSeverityRulesUpdateSchema, unknown> => ({
+const errorTrackingSeverityRulesUpdate = (): ToolBase<
+ ReturnType<typeof ErrorTrackingSeverityRulesUpdateSchema>,
+ unknown
+> => ({
name: 'error-tracking-severity-rules-update',
- schema: ErrorTrackingSeverityRulesUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingSeverityRulesUpdateSchema>) => {
+ schema: ErrorTrackingSeverityRulesUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingSeverityRulesUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.filters !== undefined) {
@@ -514,15 +551,21 @@ const errorTrackingSeverityRulesUpdate = (): ToolBase<typeof ErrorTrackingSeveri
},
})
-const ErrorTrackingSuppressionRulesCreateSchema = ErrorTrackingSuppressionRulesCreateBody
+const ErrorTrackingSuppressionRulesCreateSchema = () => {
+ const ErrorTrackingSuppressionRulesCreateBody = orvalSchemas.ErrorTrackingSuppressionRulesCreateBody()
+ return ErrorTrackingSuppressionRulesCreateBody
+}
const errorTrackingSuppressionRulesCreate = (): ToolBase<
- typeof ErrorTrackingSuppressionRulesCreateSchema,
+ ReturnType<typeof ErrorTrackingSuppressionRulesCreateSchema>,
Schemas.ErrorTrackingSuppressionRule
> => ({
name: 'error-tracking-suppression-rules-create',
- schema: ErrorTrackingSuppressionRulesCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingSuppressionRulesCreateSchema>) => {
+ schema: ErrorTrackingSuppressionRulesCreateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ErrorTrackingSuppressionRulesCreateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.filters !== undefined) {
@@ -540,15 +583,18 @@ const errorTrackingSuppressionRulesCreate = (): ToolBase<
},
})
-const ErrorTrackingSuppressionRulesListSchema = ErrorTrackingSuppressionRulesListQueryParams
+const ErrorTrackingSuppressionRulesListSchema = () => {
+ const ErrorTrackingSuppressionRulesListQueryParams = orvalSchemas.ErrorTrackingSuppressionRulesListQueryParams()
+ return ErrorTrackingSuppressionRulesListQueryParams
+}
const errorTrackingSuppressionRulesList = (): ToolBase<
- typeof ErrorTrackingSuppressionRulesListSchema,
+ ReturnType<typeof ErrorTrackingSuppressionRulesListSchema>,
Schemas.PaginatedErrorTrackingSuppressionRuleList
> => ({
name: 'error-tracking-suppression-rules-list',
- schema: ErrorTrackingSuppressionRulesListSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingSuppressionRulesListSchema>) => {
+ schema: ErrorTrackingSuppressionRulesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingSuppressionRulesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedErrorTrackingSuppressionRuleList>({
method: 'GET',
@@ -562,17 +608,24 @@ const errorTrackingSuppressionRulesList = (): ToolBase<
},
})
-const ErrorTrackingSuppressionRulesUpdateSchema = ErrorTrackingSuppressionRulesUpdateParams.omit({
- project_id: true,
-}).extend(ErrorTrackingSuppressionRulesUpdateBody.shape)
+const ErrorTrackingSuppressionRulesUpdateSchema = () => {
+ const ErrorTrackingSuppressionRulesUpdateBody = orvalSchemas.ErrorTrackingSuppressionRulesUpdateBody()
+ const ErrorTrackingSuppressionRulesUpdateParams = orvalSchemas.ErrorTrackingSuppressionRulesUpdateParams()
+ return ErrorTrackingSuppressionRulesUpdateParams.omit({ project_id: true }).extend(
+ ErrorTrackingSuppressionRulesUpdateBody.shape
+ )
+}
const errorTrackingSuppressionRulesUpdate = (): ToolBase<
- typeof ErrorTrackingSuppressionRulesUpdateSchema,
+ ReturnType<typeof ErrorTrackingSuppressionRulesUpdateSchema>,
unknown
> => ({
name: 'error-tracking-suppression-rules-update',
- schema: ErrorTrackingSuppressionRulesUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingSuppressionRulesUpdateSchema>) => {
+ schema: ErrorTrackingSuppressionRulesUpdateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ErrorTrackingSuppressionRulesUpdateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.filters !== undefined) {
@@ -590,17 +643,21 @@ const errorTrackingSuppressionRulesUpdate = (): ToolBase<
},
})
-const ErrorTrackingSymbolSetsDownloadRetrieveSchema = ErrorTrackingSymbolSetsDownloadRetrieveParams.omit({
- project_id: true,
-})
+const ErrorTrackingSymbolSetsDownloadRetrieveSchema = () => {
+ const ErrorTrackingSymbolSetsDownloadRetrieveParams = orvalSchemas.ErrorTrackingSymbolSetsDownloadRetrieveParams()
+ return ErrorTrackingSymbolSetsDownloadRetrieveParams.omit({ project_id: true })
+}
const errorTrackingSymbolSetsDownloadRetrieve = (): ToolBase<
- typeof ErrorTrackingSymbolSetsDownloadRetrieveSchema,
+ ReturnType<typeof ErrorTrackingSymbolSetsDownloadRetrieveSchema>,
Schemas._SymbolSetDownloadResponse
> => ({
name: 'error-tracking-symbol-sets-download-retrieve',
- schema: ErrorTrackingSymbolSetsDownloadRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingSymbolSetsDownloadRetrieveSchema>) => {
+ schema: ErrorTrackingSymbolSetsDownloadRetrieveSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ErrorTrackingSymbolSetsDownloadRetrieveSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas._SymbolSetDownloadResponse>({
method: 'GET',
@@ -610,15 +667,18 @@ const errorTrackingSymbolSetsDownloadRetrieve = (): ToolBase<
},
})
-const ErrorTrackingSymbolSetsListSchema = ErrorTrackingSymbolSetsListQueryParams
+const ErrorTrackingSymbolSetsListSchema = () => {
+ const ErrorTrackingSymbolSetsListQueryParams = orvalSchemas.ErrorTrackingSymbolSetsListQueryParams()
+ return ErrorTrackingSymbolSetsListQueryParams
+}
const errorTrackingSymbolSetsList = (): ToolBase<
- typeof ErrorTrackingSymbolSetsListSchema,
+ ReturnType<typeof ErrorTrackingSymbolSetsListSchema>,
WithPostHogUrl<Schemas.PaginatedErrorTrackingSymbolSetList>
> => ({
name: 'error-tracking-symbol-sets-list',
- schema: ErrorTrackingSymbolSetsListSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingSymbolSetsListSchema>) => {
+ schema: ErrorTrackingSymbolSetsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingSymbolSetsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedErrorTrackingSymbolSetList>({
method: 'GET',
@@ -650,15 +710,18 @@ const errorTrackingSymbolSetsList = (): ToolBase<
},
})
-const ErrorTrackingSymbolSetsRetrieveSchema = ErrorTrackingSymbolSetsRetrieveParams.omit({ project_id: true })
+const ErrorTrackingSymbolSetsRetrieveSchema = () => {
+ const ErrorTrackingSymbolSetsRetrieveParams = orvalSchemas.ErrorTrackingSymbolSetsRetrieveParams()
+ return ErrorTrackingSymbolSetsRetrieveParams.omit({ project_id: true })
+}
const errorTrackingSymbolSetsRetrieve = (): ToolBase<
- typeof ErrorTrackingSymbolSetsRetrieveSchema,
+ ReturnType<typeof ErrorTrackingSymbolSetsRetrieveSchema>,
Schemas.ErrorTrackingSymbolSet
> => ({
name: 'error-tracking-symbol-sets-retrieve',
- schema: ErrorTrackingSymbolSetsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingSymbolSetsRetrieveSchema>) => {
+ schema: ErrorTrackingSymbolSetsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingSymbolSetsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ErrorTrackingSymbolSet>({
method: 'GET',
@@ -677,16 +740,19 @@ const errorTrackingSymbolSetsRetrieve = (): ToolBase<
},
})
-const QueryErrorTrackingIssueSchema = ErrorTrackingQueryIssueCreateBody
+const QueryErrorTrackingIssueSchema = () => {
+ const ErrorTrackingQueryIssueCreateBody = orvalSchemas.ErrorTrackingQueryIssueCreateBody()
+ return ErrorTrackingQueryIssueCreateBody
+}
const queryErrorTrackingIssue = (): ToolBase<
- typeof QueryErrorTrackingIssueSchema,
+ ReturnType<typeof QueryErrorTrackingIssueSchema>,
WithPostHogUrl<Schemas.ErrorTrackingIssueDetail>
> =>
withUiApp('error-issue', {
name: 'query-error-tracking-issue',
- schema: QueryErrorTrackingIssueSchema,
- handler: async (context: Context, params: z.infer<typeof QueryErrorTrackingIssueSchema>) => {
+ schema: QueryErrorTrackingIssueSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof QueryErrorTrackingIssueSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.issueId !== undefined) {
@@ -713,16 +779,19 @@ const queryErrorTrackingIssue = (): ToolBase<
},
})
-const QueryErrorTrackingIssueEventsSchema = ErrorTrackingQueryIssueEventsCreateBody
+const QueryErrorTrackingIssueEventsSchema = () => {
+ const ErrorTrackingQueryIssueEventsCreateBody = orvalSchemas.ErrorTrackingQueryIssueEventsCreateBody()
+ return ErrorTrackingQueryIssueEventsCreateBody
+}
const queryErrorTrackingIssueEvents = (): ToolBase<
- typeof QueryErrorTrackingIssueEventsSchema,
+ ReturnType<typeof QueryErrorTrackingIssueEventsSchema>,
WithPostHogUrl<Schemas.ErrorTrackingIssueEventsResponse>
> =>
withUiApp('error-details', {
name: 'query-error-tracking-issue-events',
- schema: QueryErrorTrackingIssueEventsSchema,
- handler: async (context: Context, params: z.infer<typeof QueryErrorTrackingIssueEventsSchema>) => {
+ schema: QueryErrorTrackingIssueEventsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof QueryErrorTrackingIssueEventsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.issueId !== undefined) {
@@ -764,16 +833,19 @@ const queryErrorTrackingIssueEvents = (): ToolBase<
},
})
-const QueryErrorTrackingIssuesListSchema = ErrorTrackingQueryIssuesListCreateBody
+const QueryErrorTrackingIssuesListSchema = () => {
+ const ErrorTrackingQueryIssuesListCreateBody = orvalSchemas.ErrorTrackingQueryIssuesListCreateBody()
+ return ErrorTrackingQueryIssuesListCreateBody
+}
const queryErrorTrackingIssuesList = (): ToolBase<
- typeof QueryErrorTrackingIssuesListSchema,
+ ReturnType<typeof QueryErrorTrackingIssuesListSchema>,
WithPostHogUrl<Schemas.ErrorTrackingIssuesListResponse>
> =>
withUiApp('error-issue-list', {
name: 'query-error-tracking-issues-list',
- schema: QueryErrorTrackingIssuesListSchema,
- handler: async (context: Context, params: z.infer<typeof QueryErrorTrackingIssuesListSchema>) => {
+ schema: QueryErrorTrackingIssuesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof QueryErrorTrackingIssuesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.dateRange !== undefined) {
diff --git a/services/mcp/src/tools/generated/error_tracking_alerts.ts b/services/mcp/src/tools/generated/error_tracking_alerts.ts
index e4455603e1e7..1f998e618091 100644
--- a/services/mcp/src/tools/generated/error_tracking_alerts.ts
+++ b/services/mcp/src/tools/generated/error_tracking_alerts.ts
@@ -2,30 +2,30 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- HogFunctionsCreateBody,
- HogFunctionsDestroyParams,
- HogFunctionsListQueryParams,
- HogFunctionsPartialUpdateBody,
- HogFunctionsPartialUpdateParams,
-} from '@/generated/error_tracking_alerts/api'
+import * as orvalSchemas from '@/generated/error_tracking_alerts/api'
import { withPostHogUrl, pickResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const ErrorTrackingAlertsCreateSchema = HogFunctionsCreateBody.extend({
- type: HogFunctionsCreateBody.shape['type'].describe(
- 'Must be `internal_destination` for an error tracking alert. Other values create non-alert HogFunctions and should be created via `cdp-functions-create` instead.'
- ),
- template_id: HogFunctionsCreateBody.shape['template_id'].describe(
- 'Integration template — one of `template-slack`, `template-webhook`, `template-discord`, `template-microsoft-teams`, `template-linear`, `template-github`, `template-gitlab`.'
- ),
- enabled: HogFunctionsCreateBody.shape['enabled'].describe('Whether the alert is active. Defaults to true.'),
-})
+const ErrorTrackingAlertsCreateSchema = () => {
+ const HogFunctionsCreateBody = orvalSchemas.HogFunctionsCreateBody()
+ return HogFunctionsCreateBody.extend({
+ type: HogFunctionsCreateBody.shape['type'].describe(
+ 'Must be `internal_destination` for an error tracking alert. Other values create non-alert HogFunctions and should be created via `cdp-functions-create` instead.'
+ ),
+ template_id: HogFunctionsCreateBody.shape['template_id'].describe(
+ 'Integration template — one of `template-slack`, `template-webhook`, `template-discord`, `template-microsoft-teams`, `template-linear`, `template-github`, `template-gitlab`.'
+ ),
+ enabled: HogFunctionsCreateBody.shape['enabled'].describe('Whether the alert is active. Defaults to true.'),
+ })
+}
-const errorTrackingAlertsCreate = (): ToolBase<typeof ErrorTrackingAlertsCreateSchema, Schemas.HogFunction> => ({
+const errorTrackingAlertsCreate = (): ToolBase<
+ ReturnType<typeof ErrorTrackingAlertsCreateSchema>,
+ Schemas.HogFunction
+> => ({
name: 'error-tracking-alerts-create',
- schema: ErrorTrackingAlertsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingAlertsCreateSchema>) => {
+ schema: ErrorTrackingAlertsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingAlertsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.type !== undefined) {
@@ -76,12 +76,18 @@ const errorTrackingAlertsCreate = (): ToolBase<typeof ErrorTrackingAlertsCreateS
},
})
-const ErrorTrackingAlertsDeleteSchema = HogFunctionsDestroyParams.omit({ project_id: true })
+const ErrorTrackingAlertsDeleteSchema = () => {
+ const HogFunctionsDestroyParams = orvalSchemas.HogFunctionsDestroyParams()
+ return HogFunctionsDestroyParams.omit({ project_id: true })
+}
-const errorTrackingAlertsDelete = (): ToolBase<typeof ErrorTrackingAlertsDeleteSchema, Schemas.HogFunction> => ({
+const errorTrackingAlertsDelete = (): ToolBase<
+ ReturnType<typeof ErrorTrackingAlertsDeleteSchema>,
+ Schemas.HogFunction
+> => ({
name: 'error-tracking-alerts-delete',
- schema: ErrorTrackingAlertsDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingAlertsDeleteSchema>) => {
+ schema: ErrorTrackingAlertsDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingAlertsDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.HogFunction>({
method: 'PATCH',
@@ -92,15 +98,18 @@ const errorTrackingAlertsDelete = (): ToolBase<typeof ErrorTrackingAlertsDeleteS
},
})
-const ErrorTrackingAlertsListSchema = HogFunctionsListQueryParams
+const ErrorTrackingAlertsListSchema = () => {
+ const HogFunctionsListQueryParams = orvalSchemas.HogFunctionsListQueryParams()
+ return HogFunctionsListQueryParams
+}
const errorTrackingAlertsList = (): ToolBase<
- typeof ErrorTrackingAlertsListSchema,
+ ReturnType<typeof ErrorTrackingAlertsListSchema>,
WithPostHogUrl<Schemas.PaginatedHogFunctionMinimalList>
> => ({
name: 'error-tracking-alerts-list',
- schema: ErrorTrackingAlertsListSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingAlertsListSchema>) => {
+ schema: ErrorTrackingAlertsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingAlertsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedHogFunctionMinimalList>({
method: 'GET',
@@ -139,21 +148,25 @@ const errorTrackingAlertsList = (): ToolBase<
},
})
-const ErrorTrackingAlertsPartialUpdateSchema = HogFunctionsPartialUpdateParams.omit({ project_id: true })
- .extend(HogFunctionsPartialUpdateBody.shape)
- .extend({
- enabled: HogFunctionsPartialUpdateBody.shape['enabled'].describe(
- 'Set to true to activate the alert or false to silence it without deleting.'
- ),
- })
+const ErrorTrackingAlertsPartialUpdateSchema = () => {
+ const HogFunctionsPartialUpdateBody = orvalSchemas.HogFunctionsPartialUpdateBody()
+ const HogFunctionsPartialUpdateParams = orvalSchemas.HogFunctionsPartialUpdateParams()
+ return HogFunctionsPartialUpdateParams.omit({ project_id: true })
+ .extend(HogFunctionsPartialUpdateBody.shape)
+ .extend({
+ enabled: HogFunctionsPartialUpdateBody.shape['enabled'].describe(
+ 'Set to true to activate the alert or false to silence it without deleting.'
+ ),
+ })
+}
const errorTrackingAlertsPartialUpdate = (): ToolBase<
- typeof ErrorTrackingAlertsPartialUpdateSchema,
+ ReturnType<typeof ErrorTrackingAlertsPartialUpdateSchema>,
Schemas.HogFunction
> => ({
name: 'error-tracking-alerts-partial-update',
- schema: ErrorTrackingAlertsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ErrorTrackingAlertsPartialUpdateSchema>) => {
+ schema: ErrorTrackingAlertsPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ErrorTrackingAlertsPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.type !== undefined) {
diff --git a/services/mcp/src/tools/generated/experiments.ts b/services/mcp/src/tools/generated/experiments.ts
index 66655ee410af..89a2cd11e466 100644
--- a/services/mcp/src/tools/generated/experiments.ts
+++ b/services/mcp/src/tools/generated/experiments.ts
@@ -2,55 +2,7 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- ExperimentHoldoutsCreateBody,
- ExperimentHoldoutsDestroyParams,
- ExperimentHoldoutsListQueryParams,
- ExperimentHoldoutsPartialUpdateBody,
- ExperimentHoldoutsPartialUpdateParams,
- ExperimentHoldoutsRetrieveParams,
- ExperimentSavedMetricsCreateBody,
- ExperimentSavedMetricsDestroyParams,
- ExperimentSavedMetricsListQueryParams,
- ExperimentSavedMetricsPartialUpdateBody,
- ExperimentSavedMetricsPartialUpdateParams,
- ExperimentSavedMetricsRetrieveParams,
- ExperimentsActivityRetrieveParams,
- ExperimentsActivityRetrieveQueryParams,
- ExperimentsArchiveCreateBody,
- ExperimentsArchiveCreateParams,
- ExperimentsCalculateRunningTimeCreateBody,
- ExperimentsCopyToProjectCreateBody,
- ExperimentsCopyToProjectCreateParams,
- ExperimentsCreateBody,
- ExperimentsCreateFromPromptCreateBody,
- ExperimentsDestroyParams,
- ExperimentsDuplicateCreateBody,
- ExperimentsDuplicateCreateParams,
- ExperimentsEndCreateBody,
- ExperimentsEndCreateParams,
- ExperimentsFlagCleanupTaskRetrieveParams,
- ExperimentsFreezeExposureCreateParams,
- ExperimentsLaunchCreateParams,
- ExperimentsListQueryParams,
- ExperimentsMetricsRecalculationCreateBody,
- ExperimentsMetricsRecalculationCreateParams,
- ExperimentsMetricsRecalculationLatestRetrieveParams,
- ExperimentsMetricsRecalculationRetrieveParams,
- ExperimentsPartialUpdateBody,
- ExperimentsPartialUpdateParams,
- ExperimentsPauseCreateParams,
- ExperimentsResetCreateParams,
- ExperimentsResumeCreateParams,
- ExperimentsRetrieveParams,
- ExperimentsSessionEventDeltasCreateParams,
- ExperimentsShipVariantCreateBody,
- ExperimentsShipVariantCreateParams,
- ExperimentsTimeseriesResultsRetrieveParams,
- ExperimentsTimeseriesResultsRetrieveQueryParams,
- ExperimentsUnarchiveCreateParams,
- ExperimentsUnfreezeExposureCreateParams,
-} from '@/generated/experiments/api'
+import * as orvalSchemas from '@/generated/experiments/api'
import { withUiApp } from '@/resources/ui-apps'
import { SavedMetricsAttachSchema } from '@/schema/tool-inputs'
import { castStringToInt } from '@/tools/cast-helpers'
@@ -64,14 +16,21 @@ import {
} from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const ExperimentActivitySchema = ExperimentsActivityRetrieveParams.omit({ project_id: true })
- .extend(ExperimentsActivityRetrieveQueryParams.shape)
- .extend({ id: z.preprocess(castStringToInt, ExperimentsActivityRetrieveParams.shape['id']) })
+const ExperimentActivitySchema = () => {
+ const ExperimentsActivityRetrieveParams = orvalSchemas.ExperimentsActivityRetrieveParams()
+ const ExperimentsActivityRetrieveQueryParams = orvalSchemas.ExperimentsActivityRetrieveQueryParams()
+ return ExperimentsActivityRetrieveParams.omit({ project_id: true })
+ .extend(ExperimentsActivityRetrieveQueryParams.shape)
+ .extend({ id: z.preprocess(castStringToInt, ExperimentsActivityRetrieveParams.shape['id']) })
+}
-const experimentActivity = (): ToolBase<typeof ExperimentActivitySchema, Schemas.ActivityLogPaginatedResponse> => ({
+const experimentActivity = (): ToolBase<
+ ReturnType<typeof ExperimentActivitySchema>,
+ Schemas.ActivityLogPaginatedResponse
+> => ({
name: 'experiment-activity',
- schema: ExperimentActivitySchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentActivitySchema>) => {
+ schema: ExperimentActivitySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentActivitySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ActivityLogPaginatedResponse>({
method: 'GET',
@@ -85,15 +44,22 @@ const experimentActivity = (): ToolBase<typeof ExperimentActivitySchema, Schemas
},
})
-const ExperimentArchiveSchema = ExperimentsArchiveCreateParams.omit({ project_id: true })
- .extend(ExperimentsArchiveCreateBody.shape)
- .extend({ id: z.preprocess(castStringToInt, ExperimentsArchiveCreateParams.shape['id']) })
+const ExperimentArchiveSchema = () => {
+ const ExperimentsArchiveCreateBody = orvalSchemas.ExperimentsArchiveCreateBody()
+ const ExperimentsArchiveCreateParams = orvalSchemas.ExperimentsArchiveCreateParams()
+ return ExperimentsArchiveCreateParams.omit({ project_id: true })
+ .extend(ExperimentsArchiveCreateBody.shape)
+ .extend({ id: z.preprocess(castStringToInt, ExperimentsArchiveCreateParams.shape['id']) })
+}
-const experimentArchive = (): ToolBase<typeof ExperimentArchiveSchema, WithPostHogUrl<Schemas.Experiment>> =>
+const experimentArchive = (): ToolBase<
+ ReturnType<typeof ExperimentArchiveSchema>,
+ WithPostHogUrl<Schemas.Experiment>
+> =>
withUiApp('experiment', {
name: 'experiment-archive',
- schema: ExperimentArchiveSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentArchiveSchema>) => {
+ schema: ExperimentArchiveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentArchiveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.disable_feature_flag !== undefined) {
@@ -108,15 +74,18 @@ const experimentArchive = (): ToolBase<typeof ExperimentArchiveSchema, WithPostH
},
})
-const ExperimentCalculateRunningTimeSchema = ExperimentsCalculateRunningTimeCreateBody
+const ExperimentCalculateRunningTimeSchema = () => {
+ const ExperimentsCalculateRunningTimeCreateBody = orvalSchemas.ExperimentsCalculateRunningTimeCreateBody()
+ return ExperimentsCalculateRunningTimeCreateBody
+}
const experimentCalculateRunningTime = (): ToolBase<
- typeof ExperimentCalculateRunningTimeSchema,
+ ReturnType<typeof ExperimentCalculateRunningTimeSchema>,
Schemas.RunningTimeCalculationResult
> => ({
name: 'experiment-calculate-running-time',
- schema: ExperimentCalculateRunningTimeSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentCalculateRunningTimeSchema>) => {
+ schema: ExperimentCalculateRunningTimeSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentCalculateRunningTimeSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.metric_type !== undefined) {
@@ -149,14 +118,20 @@ const experimentCalculateRunningTime = (): ToolBase<
},
})
-const ExperimentCleanupTaskSchema = ExperimentsFlagCleanupTaskRetrieveParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, ExperimentsFlagCleanupTaskRetrieveParams.shape['id']),
-})
+const ExperimentCleanupTaskSchema = () => {
+ const ExperimentsFlagCleanupTaskRetrieveParams = orvalSchemas.ExperimentsFlagCleanupTaskRetrieveParams()
+ return ExperimentsFlagCleanupTaskRetrieveParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, ExperimentsFlagCleanupTaskRetrieveParams.shape['id']),
+ })
+}
-const experimentCleanupTask = (): ToolBase<typeof ExperimentCleanupTaskSchema, Schemas.ExperimentFlagCleanupTask> => ({
+const experimentCleanupTask = (): ToolBase<
+ ReturnType<typeof ExperimentCleanupTaskSchema>,
+ Schemas.ExperimentFlagCleanupTask
+> => ({
name: 'experiment-cleanup-task',
- schema: ExperimentCleanupTaskSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentCleanupTaskSchema>) => {
+ schema: ExperimentCleanupTaskSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentCleanupTaskSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ExperimentFlagCleanupTask>({
method: 'GET',
@@ -167,17 +142,21 @@ const experimentCleanupTask = (): ToolBase<typeof ExperimentCleanupTaskSchema, S
},
})
-const ExperimentCopyToProjectSchema = ExperimentsCopyToProjectCreateParams.omit({ project_id: true })
- .extend(ExperimentsCopyToProjectCreateBody.shape)
- .extend({
- id: z.preprocess(castStringToInt, ExperimentsCopyToProjectCreateParams.shape['id']),
- target_team_id: z.preprocess(castStringToInt, ExperimentsCopyToProjectCreateBody.shape['target_team_id']),
- })
+const ExperimentCopyToProjectSchema = () => {
+ const ExperimentsCopyToProjectCreateBody = orvalSchemas.ExperimentsCopyToProjectCreateBody()
+ const ExperimentsCopyToProjectCreateParams = orvalSchemas.ExperimentsCopyToProjectCreateParams()
+ return ExperimentsCopyToProjectCreateParams.omit({ project_id: true })
+ .extend(ExperimentsCopyToProjectCreateBody.shape)
+ .extend({
+ id: z.preprocess(castStringToInt, ExperimentsCopyToProjectCreateParams.shape['id']),
+ target_team_id: z.preprocess(castStringToInt, ExperimentsCopyToProjectCreateBody.shape['target_team_id']),
+ })
+}
-const experimentCopyToProject = (): ToolBase<typeof ExperimentCopyToProjectSchema, Schemas.Experiment> => ({
+const experimentCopyToProject = (): ToolBase<ReturnType<typeof ExperimentCopyToProjectSchema>, Schemas.Experiment> => ({
name: 'experiment-copy-to-project',
- schema: ExperimentCopyToProjectSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentCopyToProjectSchema>) => {
+ schema: ExperimentCopyToProjectSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentCopyToProjectSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.target_team_id !== undefined) {
@@ -215,41 +194,44 @@ const experimentCopyToProject = (): ToolBase<typeof ExperimentCopyToProjectSchem
},
})
-const ExperimentCreateSchema = ExperimentsCreateBody.omit({
- start_date: true,
- end_date: true,
- running_time_calculation: true,
- excluded_variants: true,
- secondary_metrics: true,
- saved_metrics_ids: true,
- filters: true,
- archived: true,
- deleted: true,
- type: true,
- metrics: true,
- metrics_secondary: true,
- scheduling_config: true,
- _create_in_folder: true,
- conclusion: true,
- conclusion_comment: true,
- repository: true,
- primary_metrics_ordered_uuids: true,
- secondary_metrics_ordered_uuids: true,
- only_count_matured_users: true,
- update_feature_flag_params: true,
- version: true,
- original_experiment: true,
-}).extend({
- feature_flag: ExperimentsCreateBody.shape['feature_flag'].describe(
- 'Variant split, rollout scope, payloads, and experience continuity for the auto-created feature flag, in the flag\'s own filters shape. This is the canonical input for flag config. If the user mentions a specific percentage, load the configuring-experiment-rollout skill and clarify before setting these values. Set filters.multivariate.variants (each with key and rollout_percentage; percentages must sum to 100) to customize the variant split. Set filters.groups to a single group [{"properties": [], "rollout_percentage": N}] (0-100) to control the overall fraction of users entering the experiment. Default: 50/50 control/test, 100% rollout. Omit this parameter entirely when feature_flag_key refers to a pre-existing flag: the experiment links to that flag as-is and explicit config is rejected. No specific variant key is required. The analysis baseline defaults to the variant keyed `control` (lowercase) when present, else the first variant; override with stats_config.baseline_variant_key. Convention: when the user describes variants as "A/B", "old/new", "original/redesign", or any other natural-language pair without naming explicit keys, key the baseline `control` and keep their wording in the variant `name`. When the user asks for specific keys, use them as-is and put the baseline first.'
- ),
-})
+const ExperimentCreateSchema = () => {
+ const ExperimentsCreateBody = orvalSchemas.ExperimentsCreateBody()
+ return ExperimentsCreateBody.omit({
+ start_date: true,
+ end_date: true,
+ running_time_calculation: true,
+ excluded_variants: true,
+ secondary_metrics: true,
+ saved_metrics_ids: true,
+ filters: true,
+ archived: true,
+ deleted: true,
+ type: true,
+ metrics: true,
+ metrics_secondary: true,
+ scheduling_config: true,
+ _create_in_folder: true,
+ conclusion: true,
+ conclusion_comment: true,
+ repository: true,
+ primary_metrics_ordered_uuids: true,
+ secondary_metrics_ordered_uuids: true,
+ only_count_matured_users: true,
+ update_feature_flag_params: true,
+ version: true,
+ original_experiment: true,
+ }).extend({
+ feature_flag: ExperimentsCreateBody.shape['feature_flag'].describe(
+ 'Variant split, rollout scope, payloads, and experience continuity for the auto-created feature flag, in the flag\'s own filters shape. This is the canonical input for flag config. If the user mentions a specific percentage, load the configuring-experiment-rollout skill and clarify before setting these values. Set filters.multivariate.variants (each with key and rollout_percentage; percentages must sum to 100) to customize the variant split. Set filters.groups to a single group [{"properties": [], "rollout_percentage": N}] (0-100) to control the overall fraction of users entering the experiment. Default: 50/50 control/test, 100% rollout. Omit this parameter entirely when feature_flag_key refers to a pre-existing flag: the experiment links to that flag as-is and explicit config is rejected. No specific variant key is required. The analysis baseline defaults to the variant keyed `control` (lowercase) when present, else the first variant; override with stats_config.baseline_variant_key. Convention: when the user describes variants as "A/B", "old/new", "original/redesign", or any other natural-language pair without naming explicit keys, key the baseline `control` and keep their wording in the variant `name`. When the user asks for specific keys, use them as-is and put the baseline first.'
+ ),
+ })
+}
-const experimentCreate = (): ToolBase<typeof ExperimentCreateSchema, WithPostHogUrl<Schemas.Experiment>> =>
+const experimentCreate = (): ToolBase<ReturnType<typeof ExperimentCreateSchema>, WithPostHogUrl<Schemas.Experiment>> =>
withUiApp('experiment', {
name: 'experiment-create',
- schema: ExperimentCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentCreateSchema>) => {
+ schema: ExperimentCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -305,16 +287,19 @@ const experimentCreate = (): ToolBase<typeof ExperimentCreateSchema, WithPostHog
},
})
-const ExperimentCreateFromPromptSchema = ExperimentsCreateFromPromptCreateBody
+const ExperimentCreateFromPromptSchema = () => {
+ const ExperimentsCreateFromPromptCreateBody = orvalSchemas.ExperimentsCreateFromPromptCreateBody()
+ return ExperimentsCreateFromPromptCreateBody
+}
const experimentCreateFromPrompt = (): ToolBase<
- typeof ExperimentCreateFromPromptSchema,
+ ReturnType<typeof ExperimentCreateFromPromptSchema>,
WithPostHogUrl<Schemas.Experiment>
> =>
withUiApp('experiment', {
name: 'experiment-create-from-prompt',
- schema: ExperimentCreateFromPromptSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentCreateFromPromptSchema>) => {
+ schema: ExperimentCreateFromPromptSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentCreateFromPromptSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.prompt_name !== undefined) {
@@ -361,14 +346,17 @@ const experimentCreateFromPrompt = (): ToolBase<
},
})
-const ExperimentDeleteSchema = ExperimentsDestroyParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, ExperimentsDestroyParams.shape['id']),
-})
+const ExperimentDeleteSchema = () => {
+ const ExperimentsDestroyParams = orvalSchemas.ExperimentsDestroyParams()
+ return ExperimentsDestroyParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, ExperimentsDestroyParams.shape['id']),
+ })
+}
-const experimentDelete = (): ToolBase<typeof ExperimentDeleteSchema, Schemas.Experiment> => ({
+const experimentDelete = (): ToolBase<ReturnType<typeof ExperimentDeleteSchema>, Schemas.Experiment> => ({
name: 'experiment-delete',
- schema: ExperimentDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentDeleteSchema>) => {
+ schema: ExperimentDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Experiment>({
method: 'PATCH',
@@ -380,46 +368,50 @@ const experimentDelete = (): ToolBase<typeof ExperimentDeleteSchema, Schemas.Exp
},
})
-const ExperimentDuplicateSchema = ExperimentsDuplicateCreateParams.omit({ project_id: true })
- .extend(
- ExperimentsDuplicateCreateBody.omit({
- description: true,
- start_date: true,
- end_date: true,
- holdout_id: true,
- parameters: true,
- running_time_calculation: true,
- excluded_variants: true,
- secondary_metrics: true,
- saved_metrics_ids: true,
- filters: true,
- archived: true,
- deleted: true,
- type: true,
- exposure_criteria: true,
- metrics: true,
- metrics_secondary: true,
- stats_config: true,
- scheduling_config: true,
- allow_unknown_events: true,
- _create_in_folder: true,
- conclusion: true,
- conclusion_comment: true,
- repository: true,
- primary_metrics_ordered_uuids: true,
- secondary_metrics_ordered_uuids: true,
- only_count_matured_users: true,
- update_feature_flag_params: true,
- version: true,
- original_experiment: true,
- }).shape
- )
- .extend({ id: z.preprocess(castStringToInt, ExperimentsDuplicateCreateParams.shape['id']) })
-
-const experimentDuplicate = (): ToolBase<typeof ExperimentDuplicateSchema, unknown> => ({
+const ExperimentDuplicateSchema = () => {
+ const ExperimentsDuplicateCreateBody = orvalSchemas.ExperimentsDuplicateCreateBody()
+ const ExperimentsDuplicateCreateParams = orvalSchemas.ExperimentsDuplicateCreateParams()
+ return ExperimentsDuplicateCreateParams.omit({ project_id: true })
+ .extend(
+ ExperimentsDuplicateCreateBody.omit({
+ description: true,
+ start_date: true,
+ end_date: true,
+ holdout_id: true,
+ parameters: true,
+ running_time_calculation: true,
+ excluded_variants: true,
+ secondary_metrics: true,
+ saved_metrics_ids: true,
+ filters: true,
+ archived: true,
+ deleted: true,
+ type: true,
+ exposure_criteria: true,
+ metrics: true,
+ metrics_secondary: true,
+ stats_config: true,
+ scheduling_config: true,
+ allow_unknown_events: true,
+ _create_in_folder: true,
+ conclusion: true,
+ conclusion_comment: true,
+ repository: true,
+ primary_metrics_ordered_uuids: true,
+ secondary_metrics_ordered_uuids: true,
+ only_count_matured_users: true,
+ update_feature_flag_params: true,
+ version: true,
+ original_experiment: true,
+ }).shape
+ )
+ .extend({ id: z.preprocess(castStringToInt, ExperimentsDuplicateCreateParams.shape['id']) })
+}
+
+const experimentDuplicate = (): ToolBase<ReturnType<typeof ExperimentDuplicateSchema>, unknown> => ({
name: 'experiment-duplicate',
- schema: ExperimentDuplicateSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentDuplicateSchema>) => {
+ schema: ExperimentDuplicateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentDuplicateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -437,23 +429,27 @@ const experimentDuplicate = (): ToolBase<typeof ExperimentDuplicateSchema, unkno
},
})
-const ExperimentEndSchema = ExperimentsEndCreateParams.omit({ project_id: true })
- .extend(ExperimentsEndCreateBody.shape)
- .extend({
- id: z.preprocess(castStringToInt, ExperimentsEndCreateParams.shape['id']),
- open_cleanup_pr: ExperimentsEndCreateBody.shape['open_cleanup_pr'].describe(
- "When true, a background PostHog Code task removes the experiment's feature flag code and opens a draft pull request. Only works for teams with the flag cleanup feature enabled; silently skipped otherwise. Additionally requires the task:write scope. Ask the user before setting this."
- ),
- repository: ExperimentsEndCreateBody.shape['repository'].describe(
- "Repository the cleanup pull request targets, as \"organization/repository\". Must be connected to the team's GitHub integration. Omit to fall back to the experiment's saved repository, the team default, or the team's only connected repository. When several repositories are connected and no default is set, the cleanup is skipped unless this is provided."
- ),
- })
+const ExperimentEndSchema = () => {
+ const ExperimentsEndCreateBody = orvalSchemas.ExperimentsEndCreateBody()
+ const ExperimentsEndCreateParams = orvalSchemas.ExperimentsEndCreateParams()
+ return ExperimentsEndCreateParams.omit({ project_id: true })
+ .extend(ExperimentsEndCreateBody.shape)
+ .extend({
+ id: z.preprocess(castStringToInt, ExperimentsEndCreateParams.shape['id']),
+ open_cleanup_pr: ExperimentsEndCreateBody.shape['open_cleanup_pr'].describe(
+ "When true, a background PostHog Code task removes the experiment's feature flag code and opens a draft pull request. Only works for teams with the flag cleanup feature enabled; silently skipped otherwise. Additionally requires the task:write scope. Ask the user before setting this."
+ ),
+ repository: ExperimentsEndCreateBody.shape['repository'].describe(
+ "Repository the cleanup pull request targets, as \"organization/repository\". Must be connected to the team's GitHub integration. Omit to fall back to the experiment's saved repository, the team default, or the team's only connected repository. When several repositories are connected and no default is set, the cleanup is skipped unless this is provided."
+ ),
+ })
+}
-const experimentEnd = (): ToolBase<typeof ExperimentEndSchema, WithPostHogUrl<Schemas.Experiment>> =>
+const experimentEnd = (): ToolBase<ReturnType<typeof ExperimentEndSchema>, WithPostHogUrl<Schemas.Experiment>> =>
withUiApp('experiment', {
name: 'experiment-end',
- schema: ExperimentEndSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentEndSchema>) => {
+ schema: ExperimentEndSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentEndSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.conclusion !== undefined) {
@@ -477,18 +473,21 @@ const experimentEnd = (): ToolBase<typeof ExperimentEndSchema, WithPostHogUrl<Sc
},
})
-const ExperimentFreezeExposureSchema = ExperimentsFreezeExposureCreateParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, ExperimentsFreezeExposureCreateParams.shape['id']),
-})
+const ExperimentFreezeExposureSchema = () => {
+ const ExperimentsFreezeExposureCreateParams = orvalSchemas.ExperimentsFreezeExposureCreateParams()
+ return ExperimentsFreezeExposureCreateParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, ExperimentsFreezeExposureCreateParams.shape['id']),
+ })
+}
const experimentFreezeExposure = (): ToolBase<
- typeof ExperimentFreezeExposureSchema,
+ ReturnType<typeof ExperimentFreezeExposureSchema>,
WithPostHogUrl<Schemas.Experiment>
> =>
withUiApp('experiment', {
name: 'experiment-freeze-exposure',
- schema: ExperimentFreezeExposureSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentFreezeExposureSchema>) => {
+ schema: ExperimentFreezeExposureSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentFreezeExposureSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Experiment>({
method: 'POST',
@@ -498,15 +497,18 @@ const experimentFreezeExposure = (): ToolBase<
},
})
-const ExperimentGetSchema = ExperimentsRetrieveParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, ExperimentsRetrieveParams.shape['id']),
-})
+const ExperimentGetSchema = () => {
+ const ExperimentsRetrieveParams = orvalSchemas.ExperimentsRetrieveParams()
+ return ExperimentsRetrieveParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, ExperimentsRetrieveParams.shape['id']),
+ })
+}
-const experimentGet = (): ToolBase<typeof ExperimentGetSchema, WithPostHogUrl<Schemas.Experiment>> =>
+const experimentGet = (): ToolBase<ReturnType<typeof ExperimentGetSchema>, WithPostHogUrl<Schemas.Experiment>> =>
withUiApp('experiment', {
name: 'experiment-get',
- schema: ExperimentGetSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentGetSchema>) => {
+ schema: ExperimentGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Experiment>({
method: 'GET',
@@ -516,16 +518,22 @@ const experimentGet = (): ToolBase<typeof ExperimentGetSchema, WithPostHogUrl<Sc
},
})
-const ExperimentHoldoutsCreateSchema = ExperimentHoldoutsCreateBody.extend({
- filters: ExperimentHoldoutsCreateBody.shape['filters'].describe(
- 'Non-empty list of release-condition groups defining the held-out population. Each element needs a `rollout_percentage` (0–100, may be fractional) — this is the EXCLUSION percentage, i.e. the share of users held back from every experiment that references this holdout. `properties` optionally narrows the group by person/group properties (same shape as feature-flag release conditions); pass an empty array for an unconditional holdout. Do NOT set `variant` — the server sets it to `holdout-{id}` automatically. Only the first element\'s `rollout_percentage` is embedded into each linked experiment\'s feature flag. Example: [{ "rollout_percentage": 10, "properties": [] }].'
- ),
-})
+const ExperimentHoldoutsCreateSchema = () => {
+ const ExperimentHoldoutsCreateBody = orvalSchemas.ExperimentHoldoutsCreateBody()
+ return ExperimentHoldoutsCreateBody.extend({
+ filters: ExperimentHoldoutsCreateBody.shape['filters'].describe(
+ 'Non-empty list of release-condition groups defining the held-out population. Each element needs a `rollout_percentage` (0–100, may be fractional) — this is the EXCLUSION percentage, i.e. the share of users held back from every experiment that references this holdout. `properties` optionally narrows the group by person/group properties (same shape as feature-flag release conditions); pass an empty array for an unconditional holdout. Do NOT set `variant` — the server sets it to `holdout-{id}` automatically. Only the first element\'s `rollout_percentage` is embedded into each linked experiment\'s feature flag. Example: [{ "rollout_percentage": 10, "properties": [] }].'
+ ),
+ })
+}
-const experimentHoldoutsCreate = (): ToolBase<typeof ExperimentHoldoutsCreateSchema, Schemas.ExperimentHoldout> => ({
+const experimentHoldoutsCreate = (): ToolBase<
+ ReturnType<typeof ExperimentHoldoutsCreateSchema>,
+ Schemas.ExperimentHoldout
+> => ({
name: 'experiment-holdouts-create',
- schema: ExperimentHoldoutsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentHoldoutsCreateSchema>) => {
+ schema: ExperimentHoldoutsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentHoldoutsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -546,14 +554,17 @@ const experimentHoldoutsCreate = (): ToolBase<typeof ExperimentHoldoutsCreateSch
},
})
-const ExperimentHoldoutsDestroySchema = ExperimentHoldoutsDestroyParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, ExperimentHoldoutsDestroyParams.shape['id']),
-})
+const ExperimentHoldoutsDestroySchema = () => {
+ const ExperimentHoldoutsDestroyParams = orvalSchemas.ExperimentHoldoutsDestroyParams()
+ return ExperimentHoldoutsDestroyParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, ExperimentHoldoutsDestroyParams.shape['id']),
+ })
+}
-const experimentHoldoutsDestroy = (): ToolBase<typeof ExperimentHoldoutsDestroySchema, unknown> => ({
+const experimentHoldoutsDestroy = (): ToolBase<ReturnType<typeof ExperimentHoldoutsDestroySchema>, unknown> => ({
name: 'experiment-holdouts-destroy',
- schema: ExperimentHoldoutsDestroySchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentHoldoutsDestroySchema>) => {
+ schema: ExperimentHoldoutsDestroySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentHoldoutsDestroySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -563,15 +574,18 @@ const experimentHoldoutsDestroy = (): ToolBase<typeof ExperimentHoldoutsDestroyS
},
})
-const ExperimentHoldoutsListSchema = ExperimentHoldoutsListQueryParams
+const ExperimentHoldoutsListSchema = () => {
+ const ExperimentHoldoutsListQueryParams = orvalSchemas.ExperimentHoldoutsListQueryParams()
+ return ExperimentHoldoutsListQueryParams
+}
const experimentHoldoutsList = (): ToolBase<
- typeof ExperimentHoldoutsListSchema,
+ ReturnType<typeof ExperimentHoldoutsListSchema>,
WithPostHogUrl<Schemas.PaginatedExperimentHoldoutList>
> => ({
name: 'experiment-holdouts-list',
- schema: ExperimentHoldoutsListSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentHoldoutsListSchema>) => {
+ schema: ExperimentHoldoutsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentHoldoutsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedExperimentHoldoutList>({
method: 'GET',
@@ -591,22 +605,26 @@ const experimentHoldoutsList = (): ToolBase<
},
})
-const ExperimentHoldoutsPartialUpdateSchema = ExperimentHoldoutsPartialUpdateParams.omit({ project_id: true })
- .extend(ExperimentHoldoutsPartialUpdateBody.shape)
- .extend({
- id: z.preprocess(castStringToInt, ExperimentHoldoutsPartialUpdateParams.shape['id']),
- filters: ExperimentHoldoutsPartialUpdateBody.shape['filters'].describe(
- 'Non-empty list of release-condition groups defining the held-out population. Each element needs a `rollout_percentage` (0–100, may be fractional) — the EXCLUSION percentage. Do NOT set `variant` (the server manages it as `holdout-{id}`). Changing this cascades to every linked experiment\'s feature flag. Example: [{ "rollout_percentage": 10, "properties": [] }].'
- ),
- })
+const ExperimentHoldoutsPartialUpdateSchema = () => {
+ const ExperimentHoldoutsPartialUpdateBody = orvalSchemas.ExperimentHoldoutsPartialUpdateBody()
+ const ExperimentHoldoutsPartialUpdateParams = orvalSchemas.ExperimentHoldoutsPartialUpdateParams()
+ return ExperimentHoldoutsPartialUpdateParams.omit({ project_id: true })
+ .extend(ExperimentHoldoutsPartialUpdateBody.shape)
+ .extend({
+ id: z.preprocess(castStringToInt, ExperimentHoldoutsPartialUpdateParams.shape['id']),
+ filters: ExperimentHoldoutsPartialUpdateBody.shape['filters'].describe(
+ 'Non-empty list of release-condition groups defining the held-out population. Each element needs a `rollout_percentage` (0–100, may be fractional) — the EXCLUSION percentage. Do NOT set `variant` (the server manages it as `holdout-{id}`). Changing this cascades to every linked experiment\'s feature flag. Example: [{ "rollout_percentage": 10, "properties": [] }].'
+ ),
+ })
+}
const experimentHoldoutsPartialUpdate = (): ToolBase<
- typeof ExperimentHoldoutsPartialUpdateSchema,
+ ReturnType<typeof ExperimentHoldoutsPartialUpdateSchema>,
Schemas.ExperimentHoldout
> => ({
name: 'experiment-holdouts-partial-update',
- schema: ExperimentHoldoutsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentHoldoutsPartialUpdateSchema>) => {
+ schema: ExperimentHoldoutsPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentHoldoutsPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -627,17 +645,20 @@ const experimentHoldoutsPartialUpdate = (): ToolBase<
},
})
-const ExperimentHoldoutsRetrieveSchema = ExperimentHoldoutsRetrieveParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, ExperimentHoldoutsRetrieveParams.shape['id']),
-})
+const ExperimentHoldoutsRetrieveSchema = () => {
+ const ExperimentHoldoutsRetrieveParams = orvalSchemas.ExperimentHoldoutsRetrieveParams()
+ return ExperimentHoldoutsRetrieveParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, ExperimentHoldoutsRetrieveParams.shape['id']),
+ })
+}
const experimentHoldoutsRetrieve = (): ToolBase<
- typeof ExperimentHoldoutsRetrieveSchema,
+ ReturnType<typeof ExperimentHoldoutsRetrieveSchema>,
Schemas.ExperimentHoldout
> => ({
name: 'experiment-holdouts-retrieve',
- schema: ExperimentHoldoutsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentHoldoutsRetrieveSchema>) => {
+ schema: ExperimentHoldoutsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentHoldoutsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ExperimentHoldout>({
method: 'GET',
@@ -647,15 +668,18 @@ const experimentHoldoutsRetrieve = (): ToolBase<
},
})
-const ExperimentLaunchSchema = ExperimentsLaunchCreateParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, ExperimentsLaunchCreateParams.shape['id']),
-})
+const ExperimentLaunchSchema = () => {
+ const ExperimentsLaunchCreateParams = orvalSchemas.ExperimentsLaunchCreateParams()
+ return ExperimentsLaunchCreateParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, ExperimentsLaunchCreateParams.shape['id']),
+ })
+}
-const experimentLaunch = (): ToolBase<typeof ExperimentLaunchSchema, WithPostHogUrl<Schemas.Experiment>> =>
+const experimentLaunch = (): ToolBase<ReturnType<typeof ExperimentLaunchSchema>, WithPostHogUrl<Schemas.Experiment>> =>
withUiApp('experiment', {
name: 'experiment-launch',
- schema: ExperimentLaunchSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentLaunchSchema>) => {
+ schema: ExperimentLaunchSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentLaunchSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Experiment>({
method: 'POST',
@@ -682,23 +706,26 @@ const experimentLaunch = (): ToolBase<typeof ExperimentLaunchSchema, WithPostHog
},
})
-const ExperimentListSchema = ExperimentsListQueryParams.extend({
- status: ExperimentsListQueryParams.shape['status'].describe(
- 'Filter by experiment status. Values: "draft" (not yet launched), "running" (launched, flag active), "paused" (launched, flag deactivated — mutually exclusive with running), "exposure_frozen" (launched, enrollment frozen to the already-exposed cohort while metrics keep flowing), "stopped" or "complete" (both mean ended), "all" (no filter). Defaults to all non-archived experiments.'
- ),
- limit: z.preprocess(castStringToInt, ExperimentsListQueryParams.shape['limit']).optional(),
- offset: z.preprocess(castStringToInt, ExperimentsListQueryParams.shape['offset']).optional(),
- feature_flag_id: z.preprocess(castStringToInt, ExperimentsListQueryParams.shape['feature_flag_id']).optional(),
-})
+const ExperimentListSchema = () => {
+ const ExperimentsListQueryParams = orvalSchemas.ExperimentsListQueryParams()
+ return ExperimentsListQueryParams.extend({
+ status: ExperimentsListQueryParams.shape['status'].describe(
+ 'Filter by experiment status. Values: "draft" (not yet launched), "running" (launched, flag active), "paused" (launched, flag deactivated — mutually exclusive with running), "exposure_frozen" (launched, enrollment frozen to the already-exposed cohort while metrics keep flowing), "stopped" or "complete" (both mean ended), "all" (no filter). Defaults to all non-archived experiments.'
+ ),
+ limit: z.preprocess(castStringToInt, ExperimentsListQueryParams.shape['limit']).optional(),
+ offset: z.preprocess(castStringToInt, ExperimentsListQueryParams.shape['offset']).optional(),
+ feature_flag_id: z.preprocess(castStringToInt, ExperimentsListQueryParams.shape['feature_flag_id']).optional(),
+ })
+}
const experimentList = (): ToolBase<
- typeof ExperimentListSchema,
+ ReturnType<typeof ExperimentListSchema>,
WithPostHogUrl<Schemas.PaginatedExperimentBasicList>
> =>
withUiApp('experiment-list', {
name: 'experiment-list',
- schema: ExperimentListSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentListSchema>) => {
+ schema: ExperimentListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedExperimentBasicList>({
method: 'GET',
@@ -748,19 +775,24 @@ const experimentList = (): ToolBase<
},
})
-const ExperimentMetricsRecalculationCreateSchema = ExperimentsMetricsRecalculationCreateParams.omit({
- project_id: true,
-})
- .extend(ExperimentsMetricsRecalculationCreateBody.shape)
- .extend({ id: z.preprocess(castStringToInt, ExperimentsMetricsRecalculationCreateParams.shape['id']) })
+const ExperimentMetricsRecalculationCreateSchema = () => {
+ const ExperimentsMetricsRecalculationCreateBody = orvalSchemas.ExperimentsMetricsRecalculationCreateBody()
+ const ExperimentsMetricsRecalculationCreateParams = orvalSchemas.ExperimentsMetricsRecalculationCreateParams()
+ return ExperimentsMetricsRecalculationCreateParams.omit({ project_id: true })
+ .extend(ExperimentsMetricsRecalculationCreateBody.shape)
+ .extend({ id: z.preprocess(castStringToInt, ExperimentsMetricsRecalculationCreateParams.shape['id']) })
+}
const experimentMetricsRecalculationCreate = (): ToolBase<
- typeof ExperimentMetricsRecalculationCreateSchema,
+ ReturnType<typeof ExperimentMetricsRecalculationCreateSchema>,
WithPostHogUrl<Schemas.ExperimentMetricsRecalculation>
> => ({
name: 'experiment-metrics-recalculation-create',
- schema: ExperimentMetricsRecalculationCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentMetricsRecalculationCreateSchema>) => {
+ schema: ExperimentMetricsRecalculationCreateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ExperimentMetricsRecalculationCreateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ExperimentMetricsRecalculation>({
method: 'POST',
@@ -770,20 +802,24 @@ const experimentMetricsRecalculationCreate = (): ToolBase<
},
})
-const ExperimentMetricsRecalculationLatestRetrieveSchema = ExperimentsMetricsRecalculationLatestRetrieveParams.omit({
- project_id: true,
-}).extend({ id: z.preprocess(castStringToInt, ExperimentsMetricsRecalculationLatestRetrieveParams.shape['id']) })
+const ExperimentMetricsRecalculationLatestRetrieveSchema = () => {
+ const ExperimentsMetricsRecalculationLatestRetrieveParams =
+ orvalSchemas.ExperimentsMetricsRecalculationLatestRetrieveParams()
+ return ExperimentsMetricsRecalculationLatestRetrieveParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, ExperimentsMetricsRecalculationLatestRetrieveParams.shape['id']),
+ })
+}
const experimentMetricsRecalculationLatestRetrieve = (): ToolBase<
- typeof ExperimentMetricsRecalculationLatestRetrieveSchema,
+ ReturnType<typeof ExperimentMetricsRecalculationLatestRetrieveSchema>,
WithPostHogUrl<Schemas.ExperimentMetricsRecalculation>
> =>
withUiApp('experiment-results', {
name: 'experiment-metrics-recalculation-latest-retrieve',
- schema: ExperimentMetricsRecalculationLatestRetrieveSchema,
+ schema: ExperimentMetricsRecalculationLatestRetrieveSchema(),
handler: async (
context: Context,
- params: z.infer<typeof ExperimentMetricsRecalculationLatestRetrieveSchema>
+ params: z.infer<ReturnType<typeof ExperimentMetricsRecalculationLatestRetrieveSchema>>
) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ExperimentMetricsRecalculation>({
@@ -806,17 +842,23 @@ const experimentMetricsRecalculationLatestRetrieve = (): ToolBase<
},
})
-const ExperimentMetricsRecalculationRetrieveSchema = ExperimentsMetricsRecalculationRetrieveParams.omit({
- project_id: true,
-}).extend({ id: z.preprocess(castStringToInt, ExperimentsMetricsRecalculationRetrieveParams.shape['id']) })
+const ExperimentMetricsRecalculationRetrieveSchema = () => {
+ const ExperimentsMetricsRecalculationRetrieveParams = orvalSchemas.ExperimentsMetricsRecalculationRetrieveParams()
+ return ExperimentsMetricsRecalculationRetrieveParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, ExperimentsMetricsRecalculationRetrieveParams.shape['id']),
+ })
+}
const experimentMetricsRecalculationRetrieve = (): ToolBase<
- typeof ExperimentMetricsRecalculationRetrieveSchema,
+ ReturnType<typeof ExperimentMetricsRecalculationRetrieveSchema>,
WithPostHogUrl<Schemas.ExperimentMetricsRecalculation>
> => ({
name: 'experiment-metrics-recalculation-retrieve',
- schema: ExperimentMetricsRecalculationRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentMetricsRecalculationRetrieveSchema>) => {
+ schema: ExperimentMetricsRecalculationRetrieveSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ExperimentMetricsRecalculationRetrieveSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ExperimentMetricsRecalculation>({
method: 'GET',
@@ -838,15 +880,18 @@ const experimentMetricsRecalculationRetrieve = (): ToolBase<
},
})
-const ExperimentPauseSchema = ExperimentsPauseCreateParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, ExperimentsPauseCreateParams.shape['id']),
-})
+const ExperimentPauseSchema = () => {
+ const ExperimentsPauseCreateParams = orvalSchemas.ExperimentsPauseCreateParams()
+ return ExperimentsPauseCreateParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, ExperimentsPauseCreateParams.shape['id']),
+ })
+}
-const experimentPause = (): ToolBase<typeof ExperimentPauseSchema, WithPostHogUrl<Schemas.Experiment>> =>
+const experimentPause = (): ToolBase<ReturnType<typeof ExperimentPauseSchema>, WithPostHogUrl<Schemas.Experiment>> =>
withUiApp('experiment', {
name: 'experiment-pause',
- schema: ExperimentPauseSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentPauseSchema>) => {
+ schema: ExperimentPauseSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentPauseSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Experiment>({
method: 'POST',
@@ -856,13 +901,12 @@ const experimentPause = (): ToolBase<typeof ExperimentPauseSchema, WithPostHogUr
},
})
-const ExperimentPromptTemplatesSchema = z.object({})
+const ExperimentPromptTemplatesSchema = () => z.object({})
-const experimentPromptTemplates = (): ToolBase<typeof ExperimentPromptTemplatesSchema, unknown> => ({
+const experimentPromptTemplates = (): ToolBase<ReturnType<typeof ExperimentPromptTemplatesSchema>, unknown> => ({
name: 'experiment-prompt-templates',
- schema: ExperimentPromptTemplatesSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof ExperimentPromptTemplatesSchema>) => {
+ schema: ExperimentPromptTemplatesSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof ExperimentPromptTemplatesSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'GET',
@@ -872,15 +916,18 @@ const experimentPromptTemplates = (): ToolBase<typeof ExperimentPromptTemplatesS
},
})
-const ExperimentResetSchema = ExperimentsResetCreateParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, ExperimentsResetCreateParams.shape['id']),
-})
+const ExperimentResetSchema = () => {
+ const ExperimentsResetCreateParams = orvalSchemas.ExperimentsResetCreateParams()
+ return ExperimentsResetCreateParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, ExperimentsResetCreateParams.shape['id']),
+ })
+}
-const experimentReset = (): ToolBase<typeof ExperimentResetSchema, WithPostHogUrl<Schemas.Experiment>> =>
+const experimentReset = (): ToolBase<ReturnType<typeof ExperimentResetSchema>, WithPostHogUrl<Schemas.Experiment>> =>
withUiApp('experiment', {
name: 'experiment-reset',
- schema: ExperimentResetSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentResetSchema>) => {
+ schema: ExperimentResetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentResetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Experiment>({
method: 'POST',
@@ -890,15 +937,18 @@ const experimentReset = (): ToolBase<typeof ExperimentResetSchema, WithPostHogUr
},
})
-const ExperimentResumeSchema = ExperimentsResumeCreateParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, ExperimentsResumeCreateParams.shape['id']),
-})
+const ExperimentResumeSchema = () => {
+ const ExperimentsResumeCreateParams = orvalSchemas.ExperimentsResumeCreateParams()
+ return ExperimentsResumeCreateParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, ExperimentsResumeCreateParams.shape['id']),
+ })
+}
-const experimentResume = (): ToolBase<typeof ExperimentResumeSchema, WithPostHogUrl<Schemas.Experiment>> =>
+const experimentResume = (): ToolBase<ReturnType<typeof ExperimentResumeSchema>, WithPostHogUrl<Schemas.Experiment>> =>
withUiApp('experiment', {
name: 'experiment-resume',
- schema: ExperimentResumeSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentResumeSchema>) => {
+ schema: ExperimentResumeSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentResumeSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Experiment>({
method: 'POST',
@@ -908,15 +958,18 @@ const experimentResume = (): ToolBase<typeof ExperimentResumeSchema, WithPostHog
},
})
-const ExperimentSavedMetricsCreateSchema = ExperimentSavedMetricsCreateBody
+const ExperimentSavedMetricsCreateSchema = () => {
+ const ExperimentSavedMetricsCreateBody = orvalSchemas.ExperimentSavedMetricsCreateBody()
+ return ExperimentSavedMetricsCreateBody
+}
const experimentSavedMetricsCreate = (): ToolBase<
- typeof ExperimentSavedMetricsCreateSchema,
+ ReturnType<typeof ExperimentSavedMetricsCreateSchema>,
Schemas.ExperimentSavedMetric
> => ({
name: 'experiment-saved-metrics-create',
- schema: ExperimentSavedMetricsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentSavedMetricsCreateSchema>) => {
+ schema: ExperimentSavedMetricsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentSavedMetricsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -940,14 +993,20 @@ const experimentSavedMetricsCreate = (): ToolBase<
},
})
-const ExperimentSavedMetricsDestroySchema = ExperimentSavedMetricsDestroyParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, ExperimentSavedMetricsDestroyParams.shape['id']),
-})
+const ExperimentSavedMetricsDestroySchema = () => {
+ const ExperimentSavedMetricsDestroyParams = orvalSchemas.ExperimentSavedMetricsDestroyParams()
+ return ExperimentSavedMetricsDestroyParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, ExperimentSavedMetricsDestroyParams.shape['id']),
+ })
+}
-const experimentSavedMetricsDestroy = (): ToolBase<typeof ExperimentSavedMetricsDestroySchema, unknown> => ({
+const experimentSavedMetricsDestroy = (): ToolBase<
+ ReturnType<typeof ExperimentSavedMetricsDestroySchema>,
+ unknown
+> => ({
name: 'experiment-saved-metrics-destroy',
- schema: ExperimentSavedMetricsDestroySchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentSavedMetricsDestroySchema>) => {
+ schema: ExperimentSavedMetricsDestroySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentSavedMetricsDestroySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -957,21 +1016,24 @@ const experimentSavedMetricsDestroy = (): ToolBase<typeof ExperimentSavedMetrics
},
})
-const ExperimentSavedMetricsListSchema = ExperimentSavedMetricsListQueryParams.extend({
- limit: z.preprocess(castStringToInt, ExperimentSavedMetricsListQueryParams.shape['limit']).optional(),
- offset: z.preprocess(castStringToInt, ExperimentSavedMetricsListQueryParams.shape['offset']).optional(),
- event: ExperimentSavedMetricsListQueryParams.shape['event'].describe(
- "Filter to shared metrics whose query references this event name — matched directly (an EventsNode) or via the step events of any action the metric references. For finding a reusable metric by what it measures; then confirm the match against each row's 'query'."
- ),
-})
+const ExperimentSavedMetricsListSchema = () => {
+ const ExperimentSavedMetricsListQueryParams = orvalSchemas.ExperimentSavedMetricsListQueryParams()
+ return ExperimentSavedMetricsListQueryParams.extend({
+ limit: z.preprocess(castStringToInt, ExperimentSavedMetricsListQueryParams.shape['limit']).optional(),
+ offset: z.preprocess(castStringToInt, ExperimentSavedMetricsListQueryParams.shape['offset']).optional(),
+ event: ExperimentSavedMetricsListQueryParams.shape['event'].describe(
+ "Filter to shared metrics whose query references this event name — matched directly (an EventsNode) or via the step events of any action the metric references. For finding a reusable metric by what it measures; then confirm the match against each row's 'query'."
+ ),
+ })
+}
const experimentSavedMetricsList = (): ToolBase<
- typeof ExperimentSavedMetricsListSchema,
+ ReturnType<typeof ExperimentSavedMetricsListSchema>,
WithPostHogUrl<Schemas.PaginatedExperimentSavedMetricList>
> => ({
name: 'experiment-saved-metrics-list',
- schema: ExperimentSavedMetricsListSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentSavedMetricsListSchema>) => {
+ schema: ExperimentSavedMetricsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentSavedMetricsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedExperimentSavedMetricList>({
method: 'GET',
@@ -993,17 +1055,24 @@ const experimentSavedMetricsList = (): ToolBase<
},
})
-const ExperimentSavedMetricsPartialUpdateSchema = ExperimentSavedMetricsPartialUpdateParams.omit({ project_id: true })
- .extend(ExperimentSavedMetricsPartialUpdateBody.shape)
- .extend({ id: z.preprocess(castStringToInt, ExperimentSavedMetricsPartialUpdateParams.shape['id']) })
+const ExperimentSavedMetricsPartialUpdateSchema = () => {
+ const ExperimentSavedMetricsPartialUpdateBody = orvalSchemas.ExperimentSavedMetricsPartialUpdateBody()
+ const ExperimentSavedMetricsPartialUpdateParams = orvalSchemas.ExperimentSavedMetricsPartialUpdateParams()
+ return ExperimentSavedMetricsPartialUpdateParams.omit({ project_id: true })
+ .extend(ExperimentSavedMetricsPartialUpdateBody.shape)
+ .extend({ id: z.preprocess(castStringToInt, ExperimentSavedMetricsPartialUpdateParams.shape['id']) })
+}
const experimentSavedMetricsPartialUpdate = (): ToolBase<
- typeof ExperimentSavedMetricsPartialUpdateSchema,
+ ReturnType<typeof ExperimentSavedMetricsPartialUpdateSchema>,
Schemas.ExperimentSavedMetric
> => ({
name: 'experiment-saved-metrics-partial-update',
- schema: ExperimentSavedMetricsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentSavedMetricsPartialUpdateSchema>) => {
+ schema: ExperimentSavedMetricsPartialUpdateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ExperimentSavedMetricsPartialUpdateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -1027,17 +1096,20 @@ const experimentSavedMetricsPartialUpdate = (): ToolBase<
},
})
-const ExperimentSavedMetricsRetrieveSchema = ExperimentSavedMetricsRetrieveParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, ExperimentSavedMetricsRetrieveParams.shape['id']),
-})
+const ExperimentSavedMetricsRetrieveSchema = () => {
+ const ExperimentSavedMetricsRetrieveParams = orvalSchemas.ExperimentSavedMetricsRetrieveParams()
+ return ExperimentSavedMetricsRetrieveParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, ExperimentSavedMetricsRetrieveParams.shape['id']),
+ })
+}
const experimentSavedMetricsRetrieve = (): ToolBase<
- typeof ExperimentSavedMetricsRetrieveSchema,
+ ReturnType<typeof ExperimentSavedMetricsRetrieveSchema>,
Schemas.ExperimentSavedMetric
> => ({
name: 'experiment-saved-metrics-retrieve',
- schema: ExperimentSavedMetricsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentSavedMetricsRetrieveSchema>) => {
+ schema: ExperimentSavedMetricsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentSavedMetricsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ExperimentSavedMetric>({
method: 'GET',
@@ -1047,23 +1119,30 @@ const experimentSavedMetricsRetrieve = (): ToolBase<
},
})
-const ExperimentShipVariantSchema = ExperimentsShipVariantCreateParams.omit({ project_id: true })
- .extend(ExperimentsShipVariantCreateBody.shape)
- .extend({
- id: z.preprocess(castStringToInt, ExperimentsShipVariantCreateParams.shape['id']),
- open_cleanup_pr: ExperimentsShipVariantCreateBody.shape['open_cleanup_pr'].describe(
- "When true, a background PostHog Code task removes the experiment's feature flag code, keeping the shipped variant's code path, and opens a draft pull request. Only works for teams with the flag cleanup feature enabled; silently skipped otherwise. Additionally requires the task:write scope. Ask the user before setting this."
- ),
- repository: ExperimentsShipVariantCreateBody.shape['repository'].describe(
- "Repository the cleanup pull request targets, as \"organization/repository\". Must be connected to the team's GitHub integration. Omit to fall back to the experiment's saved repository, the team default, or the team's only connected repository. When several repositories are connected and no default is set, the cleanup is skipped unless this is provided."
- ),
- })
+const ExperimentShipVariantSchema = () => {
+ const ExperimentsShipVariantCreateBody = orvalSchemas.ExperimentsShipVariantCreateBody()
+ const ExperimentsShipVariantCreateParams = orvalSchemas.ExperimentsShipVariantCreateParams()
+ return ExperimentsShipVariantCreateParams.omit({ project_id: true })
+ .extend(ExperimentsShipVariantCreateBody.shape)
+ .extend({
+ id: z.preprocess(castStringToInt, ExperimentsShipVariantCreateParams.shape['id']),
+ open_cleanup_pr: ExperimentsShipVariantCreateBody.shape['open_cleanup_pr'].describe(
+ "When true, a background PostHog Code task removes the experiment's feature flag code, keeping the shipped variant's code path, and opens a draft pull request. Only works for teams with the flag cleanup feature enabled; silently skipped otherwise. Additionally requires the task:write scope. Ask the user before setting this."
+ ),
+ repository: ExperimentsShipVariantCreateBody.shape['repository'].describe(
+ "Repository the cleanup pull request targets, as \"organization/repository\". Must be connected to the team's GitHub integration. Omit to fall back to the experiment's saved repository, the team default, or the team's only connected repository. When several repositories are connected and no default is set, the cleanup is skipped unless this is provided."
+ ),
+ })
+}
-const experimentShipVariant = (): ToolBase<typeof ExperimentShipVariantSchema, WithPostHogUrl<Schemas.Experiment>> =>
+const experimentShipVariant = (): ToolBase<
+ ReturnType<typeof ExperimentShipVariantSchema>,
+ WithPostHogUrl<Schemas.Experiment>
+> =>
withUiApp('experiment', {
name: 'experiment-ship-variant',
- schema: ExperimentShipVariantSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentShipVariantSchema>) => {
+ schema: ExperimentShipVariantSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentShipVariantSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.conclusion !== undefined) {
@@ -1093,13 +1172,12 @@ const experimentShipVariant = (): ToolBase<typeof ExperimentShipVariantSchema, W
},
})
-const ExperimentStatsSchema = z.object({})
+const ExperimentStatsSchema = () => z.object({})
-const experimentStats = (): ToolBase<typeof ExperimentStatsSchema, unknown> => ({
+const experimentStats = (): ToolBase<ReturnType<typeof ExperimentStatsSchema>, unknown> => ({
name: 'experiment-stats',
- schema: ExperimentStatsSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof ExperimentStatsSchema>) => {
+ schema: ExperimentStatsSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof ExperimentStatsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'GET',
@@ -1109,14 +1187,19 @@ const experimentStats = (): ToolBase<typeof ExperimentStatsSchema, unknown> => (
},
})
-const ExperimentTimeseriesResultsSchema = ExperimentsTimeseriesResultsRetrieveParams.omit({ project_id: true })
- .extend(ExperimentsTimeseriesResultsRetrieveQueryParams.shape)
- .extend({ id: z.preprocess(castStringToInt, ExperimentsTimeseriesResultsRetrieveParams.shape['id']) })
+const ExperimentTimeseriesResultsSchema = () => {
+ const ExperimentsTimeseriesResultsRetrieveParams = orvalSchemas.ExperimentsTimeseriesResultsRetrieveParams()
+ const ExperimentsTimeseriesResultsRetrieveQueryParams =
+ orvalSchemas.ExperimentsTimeseriesResultsRetrieveQueryParams()
+ return ExperimentsTimeseriesResultsRetrieveParams.omit({ project_id: true })
+ .extend(ExperimentsTimeseriesResultsRetrieveQueryParams.shape)
+ .extend({ id: z.preprocess(castStringToInt, ExperimentsTimeseriesResultsRetrieveParams.shape['id']) })
+}
-const experimentTimeseriesResults = (): ToolBase<typeof ExperimentTimeseriesResultsSchema, unknown> => ({
+const experimentTimeseriesResults = (): ToolBase<ReturnType<typeof ExperimentTimeseriesResultsSchema>, unknown> => ({
name: 'experiment-timeseries-results',
- schema: ExperimentTimeseriesResultsSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentTimeseriesResultsSchema>) => {
+ schema: ExperimentTimeseriesResultsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentTimeseriesResultsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'GET',
@@ -1142,15 +1225,21 @@ const experimentTimeseriesResults = (): ToolBase<typeof ExperimentTimeseriesResu
},
})
-const ExperimentUnarchiveSchema = ExperimentsUnarchiveCreateParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, ExperimentsUnarchiveCreateParams.shape['id']),
-})
+const ExperimentUnarchiveSchema = () => {
+ const ExperimentsUnarchiveCreateParams = orvalSchemas.ExperimentsUnarchiveCreateParams()
+ return ExperimentsUnarchiveCreateParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, ExperimentsUnarchiveCreateParams.shape['id']),
+ })
+}
-const experimentUnarchive = (): ToolBase<typeof ExperimentUnarchiveSchema, WithPostHogUrl<Schemas.Experiment>> =>
+const experimentUnarchive = (): ToolBase<
+ ReturnType<typeof ExperimentUnarchiveSchema>,
+ WithPostHogUrl<Schemas.Experiment>
+> =>
withUiApp('experiment', {
name: 'experiment-unarchive',
- schema: ExperimentUnarchiveSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentUnarchiveSchema>) => {
+ schema: ExperimentUnarchiveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentUnarchiveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Experiment>({
method: 'POST',
@@ -1160,18 +1249,21 @@ const experimentUnarchive = (): ToolBase<typeof ExperimentUnarchiveSchema, WithP
},
})
-const ExperimentUnfreezeExposureSchema = ExperimentsUnfreezeExposureCreateParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, ExperimentsUnfreezeExposureCreateParams.shape['id']),
-})
+const ExperimentUnfreezeExposureSchema = () => {
+ const ExperimentsUnfreezeExposureCreateParams = orvalSchemas.ExperimentsUnfreezeExposureCreateParams()
+ return ExperimentsUnfreezeExposureCreateParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, ExperimentsUnfreezeExposureCreateParams.shape['id']),
+ })
+}
const experimentUnfreezeExposure = (): ToolBase<
- typeof ExperimentUnfreezeExposureSchema,
+ ReturnType<typeof ExperimentUnfreezeExposureSchema>,
WithPostHogUrl<Schemas.Experiment>
> =>
withUiApp('experiment', {
name: 'experiment-unfreeze-exposure',
- schema: ExperimentUnfreezeExposureSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentUnfreezeExposureSchema>) => {
+ schema: ExperimentUnfreezeExposureSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentUnfreezeExposureSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Experiment>({
method: 'POST',
@@ -1181,42 +1273,46 @@ const experimentUnfreezeExposure = (): ToolBase<
},
})
-const ExperimentUpdateSchema = ExperimentsPartialUpdateParams.omit({ project_id: true })
- .extend(
- ExperimentsPartialUpdateBody.omit({
- start_date: true,
- end_date: true,
- feature_flag_key: true,
- secondary_metrics: true,
- filters: true,
- deleted: true,
- type: true,
- scheduling_config: true,
- _create_in_folder: true,
- repository: true,
- primary_metrics_ordered_uuids: true,
- secondary_metrics_ordered_uuids: true,
- only_count_matured_users: true,
- version: true,
- original_experiment: true,
- }).shape
- )
- .extend({
- id: z.preprocess(castStringToInt, ExperimentsPartialUpdateParams.shape['id']),
- feature_flag: ExperimentsPartialUpdateBody.shape['feature_flag'].describe(
- "Variant split, rollout scope, payloads, and experience continuity for the linked feature flag, in the flag's own filters shape. This is the canonical input for flag config. Set filters.multivariate.variants (each with key and rollout_percentage; percentages must sum to 100; the analysis baseline defaults to the variant keyed 'control' when present, else the first variant — except web experiments, which must keep a variant keyed 'control') to change the variant split. Set filters.groups to a single group [{\"properties\": [], \"rollout_percentage\": N}] (0-100) to change the overall rollout. Config this object omits is preserved from the flag's current state. On a running experiment this requires update_feature_flag_params=true (see rule 1: warn the user first)."
- ),
- running_time_calculation: ExperimentsPartialUpdateBody.shape['running_time_calculation'].describe(
- "Persist a running-time / sample-size plan onto the experiment (the planning target shown in the experiment's running-time panel). Object with optional keys: minimum_detectable_effect (percentage, e.g. 20 for a 20% lift), recommended_sample_size (total across all variants), recommended_running_time (days), and exposure_estimate_config."
- ),
- saved_metrics_ids: SavedMetricsAttachSchema.optional(),
- })
+const ExperimentUpdateSchema = () => {
+ const ExperimentsPartialUpdateBody = orvalSchemas.ExperimentsPartialUpdateBody()
+ const ExperimentsPartialUpdateParams = orvalSchemas.ExperimentsPartialUpdateParams()
+ return ExperimentsPartialUpdateParams.omit({ project_id: true })
+ .extend(
+ ExperimentsPartialUpdateBody.omit({
+ start_date: true,
+ end_date: true,
+ feature_flag_key: true,
+ secondary_metrics: true,
+ filters: true,
+ deleted: true,
+ type: true,
+ scheduling_config: true,
+ _create_in_folder: true,
+ repository: true,
+ primary_metrics_ordered_uuids: true,
+ secondary_metrics_ordered_uuids: true,
+ only_count_matured_users: true,
+ version: true,
+ original_experiment: true,
+ }).shape
+ )
+ .extend({
+ id: z.preprocess(castStringToInt, ExperimentsPartialUpdateParams.shape['id']),
+ feature_flag: ExperimentsPartialUpdateBody.shape['feature_flag'].describe(
+ "Variant split, rollout scope, payloads, and experience continuity for the linked feature flag, in the flag's own filters shape. This is the canonical input for flag config. Set filters.multivariate.variants (each with key and rollout_percentage; percentages must sum to 100; the analysis baseline defaults to the variant keyed 'control' when present, else the first variant — except web experiments, which must keep a variant keyed 'control') to change the variant split. Set filters.groups to a single group [{\"properties\": [], \"rollout_percentage\": N}] (0-100) to change the overall rollout. Config this object omits is preserved from the flag's current state. On a running experiment this requires update_feature_flag_params=true (see rule 1: warn the user first)."
+ ),
+ running_time_calculation: ExperimentsPartialUpdateBody.shape['running_time_calculation'].describe(
+ "Persist a running-time / sample-size plan onto the experiment (the planning target shown in the experiment's running-time panel). Object with optional keys: minimum_detectable_effect (percentage, e.g. 20 for a 20% lift), recommended_sample_size (total across all variants), recommended_running_time (days), and exposure_estimate_config."
+ ),
+ saved_metrics_ids: SavedMetricsAttachSchema.optional(),
+ })
+}
-const experimentUpdate = (): ToolBase<typeof ExperimentUpdateSchema, WithPostHogUrl<Schemas.Experiment>> =>
+const experimentUpdate = (): ToolBase<ReturnType<typeof ExperimentUpdateSchema>, WithPostHogUrl<Schemas.Experiment>> =>
withUiApp('experiment', {
name: 'experiment-update',
- schema: ExperimentUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentUpdateSchema>) => {
+ schema: ExperimentUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExperimentUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -1298,17 +1394,23 @@ const experimentUpdate = (): ToolBase<typeof ExperimentUpdateSchema, WithPostHog
},
})
-const ExperimentsSessionEventDeltasCreateSchema = ExperimentsSessionEventDeltasCreateParams.omit({
- project_id: true,
-}).extend({ id: z.preprocess(castStringToInt, ExperimentsSessionEventDeltasCreateParams.shape['id']) })
+const ExperimentsSessionEventDeltasCreateSchema = () => {
+ const ExperimentsSessionEventDeltasCreateParams = orvalSchemas.ExperimentsSessionEventDeltasCreateParams()
+ return ExperimentsSessionEventDeltasCreateParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, ExperimentsSessionEventDeltasCreateParams.shape['id']),
+ })
+}
const experimentsSessionEventDeltasCreate = (): ToolBase<
- typeof ExperimentsSessionEventDeltasCreateSchema,
+ ReturnType<typeof ExperimentsSessionEventDeltasCreateSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.ExperimentSessionEventDeltaResponse>>
> => ({
name: 'experiments-session-event-deltas-create',
- schema: ExperimentsSessionEventDeltasCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ExperimentsSessionEventDeltasCreateSchema>) => {
+ schema: ExperimentsSessionEventDeltasCreateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ExperimentsSessionEventDeltasCreateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ExperimentSessionEventDeltaResponse>({
method: 'POST',
diff --git a/services/mcp/src/tools/generated/feature_flags.ts b/services/mcp/src/tools/generated/feature_flags.ts
index edd306d2b139..430f2d449a04 100644
--- a/services/mcp/src/tools/generated/feature_flags.ts
+++ b/services/mcp/src/tools/generated/feature_flags.ts
@@ -2,58 +2,38 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- FeatureFlagsActivityRetrieveParams,
- FeatureFlagsActivityRetrieveQueryParams,
- FeatureFlagsBulkDeleteCreateBody,
- FeatureFlagsBulkKeysRetrieveBody,
- FeatureFlagsBulkUpdateTagsCreateBody,
- FeatureFlagsCopyFlagsCreateBody,
- FeatureFlagsCreateBody,
- FeatureFlagsDependentFlagsListParams,
- FeatureFlagsDestroyParams,
- FeatureFlagsEvaluationReasonsRetrieveQueryParams,
- FeatureFlagsListQueryParams,
- FeatureFlagsMyFlagsRetrieveQueryParams,
- FeatureFlagsPartialUpdateBody,
- FeatureFlagsPartialUpdateParams,
- FeatureFlagsRetrieveParams,
- FeatureFlagsStatusRetrieveParams,
- FeatureFlagsTestEvaluationCreateBody,
- FeatureFlagsTestEvaluationCreateParams,
- FeatureFlagsUserBlastRadiusCreateBody,
- ScheduledChangesCreateBody,
- ScheduledChangesDestroyParams,
- ScheduledChangesListQueryParams,
- ScheduledChangesPartialUpdateBody,
- ScheduledChangesPartialUpdateParams,
- ScheduledChangesRetrieveParams,
-} from '@/generated/feature_flags/api'
+import * as orvalSchemas from '@/generated/feature_flags/api'
import { withUiApp } from '@/resources/ui-apps'
import { validateDistinctIdPersonIdExclusive } from '@/schema/tool-inputs'
import { castStringToInt } from '@/tools/cast-helpers'
import { withPostHogUrl, pickResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const CreateFeatureFlagSchema = FeatureFlagsCreateBody.omit({ archived: true }).extend({
- is_remote_configuration: FeatureFlagsCreateBody.shape['is_remote_configuration'].describe(
- 'Whether this flag delivers a payload instead of gating a feature (Remote Config mode). When true, set the delivered payload through the `filters` param under `filters.payloads.true` as a JSON-encoded string. There is no dedicated payload parameter.'
- ),
- ensure_experience_continuity: FeatureFlagsCreateBody.shape['ensure_experience_continuity'].describe(
- 'Whether to persist the flag\'s value for a user across the anonymous-to-identified transition (the "persist across authentication steps" option in the UI). Keeps a user\'s evaluated value stable once they log in. Incompatible with `device_id` bucketing.'
- ),
- evaluation_runtime: FeatureFlagsCreateBody.shape['evaluation_runtime'].describe(
- 'Where this flag is allowed to evaluate — `server` (server-side SDKs only), `client` (client-side SDKs only), or `all` (both). Defaults to `all`.'
- ),
- bucketing_identifier: FeatureFlagsCreateBody.shape['bucketing_identifier'].describe(
- 'Identifier used to bucket users into rollout percentages and variants — `distinct_id` (user ID, the default) or `device_id`. Using `device_id` is incompatible with `ensure_experience_continuity=true`.'
- ),
-})
+const CreateFeatureFlagSchema = () => {
+ const FeatureFlagsCreateBody = orvalSchemas.FeatureFlagsCreateBody()
+ return FeatureFlagsCreateBody.omit({ archived: true }).extend({
+ is_remote_configuration: FeatureFlagsCreateBody.shape['is_remote_configuration'].describe(
+ 'Whether this flag delivers a payload instead of gating a feature (Remote Config mode). When true, set the delivered payload through the `filters` param under `filters.payloads.true` as a JSON-encoded string. There is no dedicated payload parameter.'
+ ),
+ ensure_experience_continuity: FeatureFlagsCreateBody.shape['ensure_experience_continuity'].describe(
+ 'Whether to persist the flag\'s value for a user across the anonymous-to-identified transition (the "persist across authentication steps" option in the UI). Keeps a user\'s evaluated value stable once they log in. Incompatible with `device_id` bucketing.'
+ ),
+ evaluation_runtime: FeatureFlagsCreateBody.shape['evaluation_runtime'].describe(
+ 'Where this flag is allowed to evaluate — `server` (server-side SDKs only), `client` (client-side SDKs only), or `all` (both). Defaults to `all`.'
+ ),
+ bucketing_identifier: FeatureFlagsCreateBody.shape['bucketing_identifier'].describe(
+ 'Identifier used to bucket users into rollout percentages and variants — `distinct_id` (user ID, the default) or `device_id`. Using `device_id` is incompatible with `ensure_experience_continuity=true`.'
+ ),
+ })
+}
-const createFeatureFlag = (): ToolBase<typeof CreateFeatureFlagSchema, WithPostHogUrl<Schemas.FeatureFlag>> => ({
+const createFeatureFlag = (): ToolBase<
+ ReturnType<typeof CreateFeatureFlagSchema>,
+ WithPostHogUrl<Schemas.FeatureFlag>
+> => ({
name: 'create-feature-flag',
- schema: CreateFeatureFlagSchema,
- handler: async (context: Context, params: z.infer<typeof CreateFeatureFlagSchema>) => {
+ schema: CreateFeatureFlagSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CreateFeatureFlagSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.key !== undefined) {
@@ -95,14 +75,17 @@ const createFeatureFlag = (): ToolBase<typeof CreateFeatureFlagSchema, WithPostH
},
})
-const DeleteFeatureFlagSchema = FeatureFlagsDestroyParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, FeatureFlagsDestroyParams.shape['id']),
-})
+const DeleteFeatureFlagSchema = () => {
+ const FeatureFlagsDestroyParams = orvalSchemas.FeatureFlagsDestroyParams()
+ return FeatureFlagsDestroyParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, FeatureFlagsDestroyParams.shape['id']),
+ })
+}
-const deleteFeatureFlag = (): ToolBase<typeof DeleteFeatureFlagSchema, Schemas.FeatureFlag> => ({
+const deleteFeatureFlag = (): ToolBase<ReturnType<typeof DeleteFeatureFlagSchema>, Schemas.FeatureFlag> => ({
name: 'delete-feature-flag',
- schema: DeleteFeatureFlagSchema,
- handler: async (context: Context, params: z.infer<typeof DeleteFeatureFlagSchema>) => {
+ schema: DeleteFeatureFlagSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DeleteFeatureFlagSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.FeatureFlag>({
method: 'PATCH',
@@ -113,21 +96,24 @@ const deleteFeatureFlag = (): ToolBase<typeof DeleteFeatureFlagSchema, Schemas.F
},
})
-const FeatureFlagGetAllSchema = FeatureFlagsListQueryParams.extend({
- search: FeatureFlagsListQueryParams.shape['search'].describe(
- 'Search by feature flag key or name (case-insensitive). Use this to find the flag ID for get/update/delete tools.'
- ),
- limit: z.preprocess(castStringToInt, FeatureFlagsListQueryParams.shape['limit']).optional(),
- offset: z.preprocess(castStringToInt, FeatureFlagsListQueryParams.shape['offset']).optional(),
-})
+const FeatureFlagGetAllSchema = () => {
+ const FeatureFlagsListQueryParams = orvalSchemas.FeatureFlagsListQueryParams()
+ return FeatureFlagsListQueryParams.extend({
+ search: FeatureFlagsListQueryParams.shape['search'].describe(
+ 'Search by feature flag key or name (case-insensitive). Use this to find the flag ID for get/update/delete tools.'
+ ),
+ limit: z.preprocess(castStringToInt, FeatureFlagsListQueryParams.shape['limit']).optional(),
+ offset: z.preprocess(castStringToInt, FeatureFlagsListQueryParams.shape['offset']).optional(),
+ })
+}
const featureFlagGetAll = (): ToolBase<
- typeof FeatureFlagGetAllSchema,
+ ReturnType<typeof FeatureFlagGetAllSchema>,
WithPostHogUrl<Schemas.PaginatedFeatureFlagList>
> => ({
name: 'feature-flag-get-all',
- schema: FeatureFlagGetAllSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureFlagGetAllSchema>) => {
+ schema: FeatureFlagGetAllSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureFlagGetAllSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedFeatureFlagList>({
method: 'GET',
@@ -168,17 +154,20 @@ const featureFlagGetAll = (): ToolBase<
},
})
-const FeatureFlagGetDefinitionSchema = FeatureFlagsRetrieveParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, FeatureFlagsRetrieveParams.shape['id']),
-})
+const FeatureFlagGetDefinitionSchema = () => {
+ const FeatureFlagsRetrieveParams = orvalSchemas.FeatureFlagsRetrieveParams()
+ return FeatureFlagsRetrieveParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, FeatureFlagsRetrieveParams.shape['id']),
+ })
+}
const featureFlagGetDefinition = (): ToolBase<
- typeof FeatureFlagGetDefinitionSchema,
+ ReturnType<typeof FeatureFlagGetDefinitionSchema>,
WithPostHogUrl<Schemas.FeatureFlag>
> => ({
name: 'feature-flag-get-definition',
- schema: FeatureFlagGetDefinitionSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureFlagGetDefinitionSchema>) => {
+ schema: FeatureFlagGetDefinitionSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureFlagGetDefinitionSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.FeatureFlag>({
method: 'GET',
@@ -188,17 +177,21 @@ const featureFlagGetDefinition = (): ToolBase<
},
})
-const FeatureFlagsActivityRetrieveSchema = FeatureFlagsActivityRetrieveParams.omit({ project_id: true })
- .extend(FeatureFlagsActivityRetrieveQueryParams.shape)
- .extend({ id: z.preprocess(castStringToInt, FeatureFlagsActivityRetrieveParams.shape['id']) })
+const FeatureFlagsActivityRetrieveSchema = () => {
+ const FeatureFlagsActivityRetrieveParams = orvalSchemas.FeatureFlagsActivityRetrieveParams()
+ const FeatureFlagsActivityRetrieveQueryParams = orvalSchemas.FeatureFlagsActivityRetrieveQueryParams()
+ return FeatureFlagsActivityRetrieveParams.omit({ project_id: true })
+ .extend(FeatureFlagsActivityRetrieveQueryParams.shape)
+ .extend({ id: z.preprocess(castStringToInt, FeatureFlagsActivityRetrieveParams.shape['id']) })
+}
const featureFlagsActivityRetrieve = (): ToolBase<
- typeof FeatureFlagsActivityRetrieveSchema,
+ ReturnType<typeof FeatureFlagsActivityRetrieveSchema>,
Schemas.ActivityLogPaginatedResponse
> => ({
name: 'feature-flags-activity-retrieve',
- schema: FeatureFlagsActivityRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureFlagsActivityRetrieveSchema>) => {
+ schema: FeatureFlagsActivityRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureFlagsActivityRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ActivityLogPaginatedResponse>({
method: 'GET',
@@ -212,15 +205,18 @@ const featureFlagsActivityRetrieve = (): ToolBase<
},
})
-const FeatureFlagsBulkDeleteCreateSchema = FeatureFlagsBulkDeleteCreateBody
+const FeatureFlagsBulkDeleteCreateSchema = () => {
+ const FeatureFlagsBulkDeleteCreateBody = orvalSchemas.FeatureFlagsBulkDeleteCreateBody()
+ return FeatureFlagsBulkDeleteCreateBody
+}
const featureFlagsBulkDeleteCreate = (): ToolBase<
- typeof FeatureFlagsBulkDeleteCreateSchema,
+ ReturnType<typeof FeatureFlagsBulkDeleteCreateSchema>,
Schemas.BulkDeleteResponse
> => ({
name: 'feature-flags-bulk-delete-create',
- schema: FeatureFlagsBulkDeleteCreateSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureFlagsBulkDeleteCreateSchema>) => {
+ schema: FeatureFlagsBulkDeleteCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureFlagsBulkDeleteCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.filters !== undefined) {
@@ -238,15 +234,18 @@ const featureFlagsBulkDeleteCreate = (): ToolBase<
},
})
-const FeatureFlagsBulkKeysRetrieveSchema = FeatureFlagsBulkKeysRetrieveBody
+const FeatureFlagsBulkKeysRetrieveSchema = () => {
+ const FeatureFlagsBulkKeysRetrieveBody = orvalSchemas.FeatureFlagsBulkKeysRetrieveBody()
+ return FeatureFlagsBulkKeysRetrieveBody
+}
const featureFlagsBulkKeysRetrieve = (): ToolBase<
- typeof FeatureFlagsBulkKeysRetrieveSchema,
+ ReturnType<typeof FeatureFlagsBulkKeysRetrieveSchema>,
Schemas.BulkKeysResponse
> => ({
name: 'feature-flags-bulk-keys-retrieve',
- schema: FeatureFlagsBulkKeysRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureFlagsBulkKeysRetrieveSchema>) => {
+ schema: FeatureFlagsBulkKeysRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureFlagsBulkKeysRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.ids !== undefined) {
@@ -261,15 +260,18 @@ const featureFlagsBulkKeysRetrieve = (): ToolBase<
},
})
-const FeatureFlagsBulkUpdateTagsCreateSchema = FeatureFlagsBulkUpdateTagsCreateBody
+const FeatureFlagsBulkUpdateTagsCreateSchema = () => {
+ const FeatureFlagsBulkUpdateTagsCreateBody = orvalSchemas.FeatureFlagsBulkUpdateTagsCreateBody()
+ return FeatureFlagsBulkUpdateTagsCreateBody
+}
const featureFlagsBulkUpdateTagsCreate = (): ToolBase<
- typeof FeatureFlagsBulkUpdateTagsCreateSchema,
+ ReturnType<typeof FeatureFlagsBulkUpdateTagsCreateSchema>,
Schemas.BulkUpdateTagsResponse
> => ({
name: 'feature-flags-bulk-update-tags-create',
- schema: FeatureFlagsBulkUpdateTagsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureFlagsBulkUpdateTagsCreateSchema>) => {
+ schema: FeatureFlagsBulkUpdateTagsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureFlagsBulkUpdateTagsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.ids !== undefined) {
@@ -290,15 +292,18 @@ const featureFlagsBulkUpdateTagsCreate = (): ToolBase<
},
})
-const FeatureFlagsCopyFlagsCreateSchema = FeatureFlagsCopyFlagsCreateBody
+const FeatureFlagsCopyFlagsCreateSchema = () => {
+ const FeatureFlagsCopyFlagsCreateBody = orvalSchemas.FeatureFlagsCopyFlagsCreateBody()
+ return FeatureFlagsCopyFlagsCreateBody
+}
const featureFlagsCopyFlagsCreate = (): ToolBase<
- typeof FeatureFlagsCopyFlagsCreateSchema,
+ ReturnType<typeof FeatureFlagsCopyFlagsCreateSchema>,
Schemas.CopyFlagsResponse
> => ({
name: 'feature-flags-copy-flags-create',
- schema: FeatureFlagsCopyFlagsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureFlagsCopyFlagsCreateSchema>) => {
+ schema: FeatureFlagsCopyFlagsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureFlagsCopyFlagsCreateSchema>>) => {
const orgId = await context.stateManager.getOrgID()
const body: Record<string, unknown> = {}
if (params.feature_flag_key !== undefined) {
@@ -328,17 +333,20 @@ const featureFlagsCopyFlagsCreate = (): ToolBase<
},
})
-const FeatureFlagsDependentFlagsRetrieveSchema = FeatureFlagsDependentFlagsListParams.omit({ project_id: true }).extend(
- { id: z.preprocess(castStringToInt, FeatureFlagsDependentFlagsListParams.shape['id']) }
-)
+const FeatureFlagsDependentFlagsRetrieveSchema = () => {
+ const FeatureFlagsDependentFlagsListParams = orvalSchemas.FeatureFlagsDependentFlagsListParams()
+ return FeatureFlagsDependentFlagsListParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, FeatureFlagsDependentFlagsListParams.shape['id']),
+ })
+}
const featureFlagsDependentFlagsRetrieve = (): ToolBase<
- typeof FeatureFlagsDependentFlagsRetrieveSchema,
+ ReturnType<typeof FeatureFlagsDependentFlagsRetrieveSchema>,
Schemas.DependentFlag[]
> => ({
name: 'feature-flags-dependent-flags-retrieve',
- schema: FeatureFlagsDependentFlagsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureFlagsDependentFlagsRetrieveSchema>) => {
+ schema: FeatureFlagsDependentFlagsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureFlagsDependentFlagsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.DependentFlag[]>({
method: 'GET',
@@ -348,15 +356,22 @@ const featureFlagsDependentFlagsRetrieve = (): ToolBase<
},
})
-const FeatureFlagsEvaluationReasonsRetrieveSchema = FeatureFlagsEvaluationReasonsRetrieveQueryParams
+const FeatureFlagsEvaluationReasonsRetrieveSchema = () => {
+ const FeatureFlagsEvaluationReasonsRetrieveQueryParams =
+ orvalSchemas.FeatureFlagsEvaluationReasonsRetrieveQueryParams()
+ return FeatureFlagsEvaluationReasonsRetrieveQueryParams
+}
const featureFlagsEvaluationReasonsRetrieve = (): ToolBase<
- typeof FeatureFlagsEvaluationReasonsRetrieveSchema,
+ ReturnType<typeof FeatureFlagsEvaluationReasonsRetrieveSchema>,
unknown
> => ({
name: 'feature-flags-evaluation-reasons-retrieve',
- schema: FeatureFlagsEvaluationReasonsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureFlagsEvaluationReasonsRetrieveSchema>) => {
+ schema: FeatureFlagsEvaluationReasonsRetrieveSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof FeatureFlagsEvaluationReasonsRetrieveSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'GET',
@@ -371,15 +386,18 @@ const featureFlagsEvaluationReasonsRetrieve = (): ToolBase<
},
})
-const FeatureFlagsMyFlagsRetrieveSchema = FeatureFlagsMyFlagsRetrieveQueryParams
+const FeatureFlagsMyFlagsRetrieveSchema = () => {
+ const FeatureFlagsMyFlagsRetrieveQueryParams = orvalSchemas.FeatureFlagsMyFlagsRetrieveQueryParams()
+ return FeatureFlagsMyFlagsRetrieveQueryParams
+}
const featureFlagsMyFlagsRetrieve = (): ToolBase<
- typeof FeatureFlagsMyFlagsRetrieveSchema,
+ ReturnType<typeof FeatureFlagsMyFlagsRetrieveSchema>,
WithPostHogUrl<Schemas.MyFlagsResponse[]>
> => ({
name: 'feature-flags-my-flags-retrieve',
- schema: FeatureFlagsMyFlagsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureFlagsMyFlagsRetrieveSchema>) => {
+ schema: FeatureFlagsMyFlagsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureFlagsMyFlagsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.MyFlagsResponse[]>({
method: 'GET',
@@ -393,17 +411,20 @@ const featureFlagsMyFlagsRetrieve = (): ToolBase<
},
})
-const FeatureFlagsStatusRetrieveSchema = FeatureFlagsStatusRetrieveParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, FeatureFlagsStatusRetrieveParams.shape['id']),
-})
+const FeatureFlagsStatusRetrieveSchema = () => {
+ const FeatureFlagsStatusRetrieveParams = orvalSchemas.FeatureFlagsStatusRetrieveParams()
+ return FeatureFlagsStatusRetrieveParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, FeatureFlagsStatusRetrieveParams.shape['id']),
+ })
+}
const featureFlagsStatusRetrieve = (): ToolBase<
- typeof FeatureFlagsStatusRetrieveSchema,
+ ReturnType<typeof FeatureFlagsStatusRetrieveSchema>,
Schemas.FeatureFlagStatusResponse
> => ({
name: 'feature-flags-status-retrieve',
- schema: FeatureFlagsStatusRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureFlagsStatusRetrieveSchema>) => {
+ schema: FeatureFlagsStatusRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureFlagsStatusRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.FeatureFlagStatusResponse>({
method: 'GET',
@@ -413,19 +434,26 @@ const featureFlagsStatusRetrieve = (): ToolBase<
},
})
-const FeatureFlagsTestEvaluationCreateSchema = FeatureFlagsTestEvaluationCreateParams.omit({ project_id: true })
- .extend(FeatureFlagsTestEvaluationCreateBody.shape)
- .extend({ id: z.preprocess(castStringToInt, FeatureFlagsTestEvaluationCreateParams.shape['id']) })
- .superRefine(validateDistinctIdPersonIdExclusive)
+const FeatureFlagsTestEvaluationCreateSchema = () => {
+ const FeatureFlagsTestEvaluationCreateBody = orvalSchemas.FeatureFlagsTestEvaluationCreateBody()
+ const FeatureFlagsTestEvaluationCreateParams = orvalSchemas.FeatureFlagsTestEvaluationCreateParams()
+ return FeatureFlagsTestEvaluationCreateParams.omit({ project_id: true })
+ .extend(FeatureFlagsTestEvaluationCreateBody.shape)
+ .extend({ id: z.preprocess(castStringToInt, FeatureFlagsTestEvaluationCreateParams.shape['id']) })
+ .superRefine(validateDistinctIdPersonIdExclusive)
+}
const featureFlagsTestEvaluationCreate = (): ToolBase<
- typeof FeatureFlagsTestEvaluationCreateSchema,
+ ReturnType<typeof FeatureFlagsTestEvaluationCreateSchema>,
Schemas.FeatureFlagTestEvaluationResponse
> =>
withUiApp('feature-flag-testing', {
name: 'feature-flags-test-evaluation-create',
- schema: FeatureFlagsTestEvaluationCreateSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureFlagsTestEvaluationCreateSchema>) => {
+ schema: FeatureFlagsTestEvaluationCreateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof FeatureFlagsTestEvaluationCreateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.distinct_id !== undefined) {
@@ -449,15 +477,18 @@ const featureFlagsTestEvaluationCreate = (): ToolBase<
},
})
-const FeatureFlagsUserBlastRadiusCreateSchema = FeatureFlagsUserBlastRadiusCreateBody
+const FeatureFlagsUserBlastRadiusCreateSchema = () => {
+ const FeatureFlagsUserBlastRadiusCreateBody = orvalSchemas.FeatureFlagsUserBlastRadiusCreateBody()
+ return FeatureFlagsUserBlastRadiusCreateBody
+}
const featureFlagsUserBlastRadiusCreate = (): ToolBase<
- typeof FeatureFlagsUserBlastRadiusCreateSchema,
+ ReturnType<typeof FeatureFlagsUserBlastRadiusCreateSchema>,
Schemas.UserBlastRadiusResponse
> => ({
name: 'feature-flags-user-blast-radius-create',
- schema: FeatureFlagsUserBlastRadiusCreateSchema,
- handler: async (context: Context, params: z.infer<typeof FeatureFlagsUserBlastRadiusCreateSchema>) => {
+ schema: FeatureFlagsUserBlastRadiusCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FeatureFlagsUserBlastRadiusCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.condition !== undefined) {
@@ -475,12 +506,18 @@ const featureFlagsUserBlastRadiusCreate = (): ToolBase<
},
})
-const ScheduledChangesCreateSchema = ScheduledChangesCreateBody
+const ScheduledChangesCreateSchema = () => {
+ const ScheduledChangesCreateBody = orvalSchemas.ScheduledChangesCreateBody()
+ return ScheduledChangesCreateBody
+}
-const scheduledChangesCreate = (): ToolBase<typeof ScheduledChangesCreateSchema, Schemas.ScheduledChange> => ({
+const scheduledChangesCreate = (): ToolBase<
+ ReturnType<typeof ScheduledChangesCreateSchema>,
+ Schemas.ScheduledChange
+> => ({
name: 'scheduled-changes-create',
- schema: ScheduledChangesCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ScheduledChangesCreateSchema>) => {
+ schema: ScheduledChangesCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScheduledChangesCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.record_id !== undefined) {
@@ -516,12 +553,15 @@ const scheduledChangesCreate = (): ToolBase<typeof ScheduledChangesCreateSchema,
},
})
-const ScheduledChangesDeleteSchema = ScheduledChangesDestroyParams.omit({ project_id: true })
+const ScheduledChangesDeleteSchema = () => {
+ const ScheduledChangesDestroyParams = orvalSchemas.ScheduledChangesDestroyParams()
+ return ScheduledChangesDestroyParams.omit({ project_id: true })
+}
-const scheduledChangesDelete = (): ToolBase<typeof ScheduledChangesDeleteSchema, unknown> => ({
+const scheduledChangesDelete = (): ToolBase<ReturnType<typeof ScheduledChangesDeleteSchema>, unknown> => ({
name: 'scheduled-changes-delete',
- schema: ScheduledChangesDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof ScheduledChangesDeleteSchema>) => {
+ schema: ScheduledChangesDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScheduledChangesDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -531,12 +571,15 @@ const scheduledChangesDelete = (): ToolBase<typeof ScheduledChangesDeleteSchema,
},
})
-const ScheduledChangesGetSchema = ScheduledChangesRetrieveParams.omit({ project_id: true })
+const ScheduledChangesGetSchema = () => {
+ const ScheduledChangesRetrieveParams = orvalSchemas.ScheduledChangesRetrieveParams()
+ return ScheduledChangesRetrieveParams.omit({ project_id: true })
+}
-const scheduledChangesGet = (): ToolBase<typeof ScheduledChangesGetSchema, Schemas.ScheduledChange> => ({
+const scheduledChangesGet = (): ToolBase<ReturnType<typeof ScheduledChangesGetSchema>, Schemas.ScheduledChange> => ({
name: 'scheduled-changes-get',
- schema: ScheduledChangesGetSchema,
- handler: async (context: Context, params: z.infer<typeof ScheduledChangesGetSchema>) => {
+ schema: ScheduledChangesGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScheduledChangesGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ScheduledChange>({
method: 'GET',
@@ -546,22 +589,25 @@ const scheduledChangesGet = (): ToolBase<typeof ScheduledChangesGetSchema, Schem
},
})
-const ScheduledChangesListSchema = ScheduledChangesListQueryParams.extend({
- model_name: ScheduledChangesListQueryParams.shape['model_name'].describe(
- 'Filter by model type. Use "FeatureFlag" to see feature flag schedules.'
- ),
- record_id: ScheduledChangesListQueryParams.shape['record_id'].describe(
- 'Filter by the ID of a specific feature flag.'
- ),
-})
+const ScheduledChangesListSchema = () => {
+ const ScheduledChangesListQueryParams = orvalSchemas.ScheduledChangesListQueryParams()
+ return ScheduledChangesListQueryParams.extend({
+ model_name: ScheduledChangesListQueryParams.shape['model_name'].describe(
+ 'Filter by model type. Use "FeatureFlag" to see feature flag schedules.'
+ ),
+ record_id: ScheduledChangesListQueryParams.shape['record_id'].describe(
+ 'Filter by the ID of a specific feature flag.'
+ ),
+ })
+}
const scheduledChangesList = (): ToolBase<
- typeof ScheduledChangesListSchema,
+ ReturnType<typeof ScheduledChangesListSchema>,
WithPostHogUrl<Schemas.PaginatedScheduledChangeList>
> => ({
name: 'scheduled-changes-list',
- schema: ScheduledChangesListSchema,
- handler: async (context: Context, params: z.infer<typeof ScheduledChangesListSchema>) => {
+ schema: ScheduledChangesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScheduledChangesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedScheduledChangeList>({
method: 'GET',
@@ -577,14 +623,21 @@ const scheduledChangesList = (): ToolBase<
},
})
-const ScheduledChangesUpdateSchema = ScheduledChangesPartialUpdateParams.omit({ project_id: true }).extend(
- ScheduledChangesPartialUpdateBody.shape
-)
+const ScheduledChangesUpdateSchema = () => {
+ const ScheduledChangesPartialUpdateBody = orvalSchemas.ScheduledChangesPartialUpdateBody()
+ const ScheduledChangesPartialUpdateParams = orvalSchemas.ScheduledChangesPartialUpdateParams()
+ return ScheduledChangesPartialUpdateParams.omit({ project_id: true }).extend(
+ ScheduledChangesPartialUpdateBody.shape
+ )
+}
-const scheduledChangesUpdate = (): ToolBase<typeof ScheduledChangesUpdateSchema, Schemas.ScheduledChange> => ({
+const scheduledChangesUpdate = (): ToolBase<
+ ReturnType<typeof ScheduledChangesUpdateSchema>,
+ Schemas.ScheduledChange
+> => ({
name: 'scheduled-changes-update',
- schema: ScheduledChangesUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ScheduledChangesUpdateSchema>) => {
+ schema: ScheduledChangesUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScheduledChangesUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.record_id !== undefined) {
@@ -620,28 +673,35 @@ const scheduledChangesUpdate = (): ToolBase<typeof ScheduledChangesUpdateSchema,
},
})
-const UpdateFeatureFlagSchema = FeatureFlagsPartialUpdateParams.omit({ project_id: true })
- .extend(FeatureFlagsPartialUpdateBody.shape)
- .extend({
- id: z.preprocess(castStringToInt, FeatureFlagsPartialUpdateParams.shape['id']),
- is_remote_configuration: FeatureFlagsPartialUpdateBody.shape['is_remote_configuration'].describe(
- 'Whether this flag delivers a payload instead of gating a feature (Remote Config mode). When true, set the delivered payload through the `filters` param under `filters.payloads.true` as a JSON-encoded string. There is no dedicated payload parameter.'
- ),
- ensure_experience_continuity: FeatureFlagsPartialUpdateBody.shape['ensure_experience_continuity'].describe(
- 'Whether to persist the flag\'s value for a user across the anonymous-to-identified transition (the "persist across authentication steps" option in the UI). Keeps a user\'s evaluated value stable once they log in. Incompatible with `device_id` bucketing.'
- ),
- evaluation_runtime: FeatureFlagsPartialUpdateBody.shape['evaluation_runtime'].describe(
- 'Where this flag is allowed to evaluate — `server` (server-side SDKs only), `client` (client-side SDKs only), or `all` (both). Defaults to `all`.'
- ),
- bucketing_identifier: FeatureFlagsPartialUpdateBody.shape['bucketing_identifier'].describe(
- 'Identifier used to bucket users into rollout percentages and variants — `distinct_id` (user ID, the default) or `device_id`. Using `device_id` is incompatible with `ensure_experience_continuity=true`.'
- ),
- })
+const UpdateFeatureFlagSchema = () => {
+ const FeatureFlagsPartialUpdateBody = orvalSchemas.FeatureFlagsPartialUpdateBody()
+ const FeatureFlagsPartialUpdateParams = orvalSchemas.FeatureFlagsPartialUpdateParams()
+ return FeatureFlagsPartialUpdateParams.omit({ project_id: true })
+ .extend(FeatureFlagsPartialUpdateBody.shape)
+ .extend({
+ id: z.preprocess(castStringToInt, FeatureFlagsPartialUpdateParams.shape['id']),
+ is_remote_configuration: FeatureFlagsPartialUpdateBody.shape['is_remote_configuration'].describe(
+ 'Whether this flag delivers a payload instead of gating a feature (Remote Config mode). When true, set the delivered payload through the `filters` param under `filters.payloads.true` as a JSON-encoded string. There is no dedicated payload parameter.'
+ ),
+ ensure_experience_continuity: FeatureFlagsPartialUpdateBody.shape['ensure_experience_continuity'].describe(
+ 'Whether to persist the flag\'s value for a user across the anonymous-to-identified transition (the "persist across authentication steps" option in the UI). Keeps a user\'s evaluated value stable once they log in. Incompatible with `device_id` bucketing.'
+ ),
+ evaluation_runtime: FeatureFlagsPartialUpdateBody.shape['evaluation_runtime'].describe(
+ 'Where this flag is allowed to evaluate — `server` (server-side SDKs only), `client` (client-side SDKs only), or `all` (both). Defaults to `all`.'
+ ),
+ bucketing_identifier: FeatureFlagsPartialUpdateBody.shape['bucketing_identifier'].describe(
+ 'Identifier used to bucket users into rollout percentages and variants — `distinct_id` (user ID, the default) or `device_id`. Using `device_id` is incompatible with `ensure_experience_continuity=true`.'
+ ),
+ })
+}
-const updateFeatureFlag = (): ToolBase<typeof UpdateFeatureFlagSchema, WithPostHogUrl<Schemas.FeatureFlag>> => ({
+const updateFeatureFlag = (): ToolBase<
+ ReturnType<typeof UpdateFeatureFlagSchema>,
+ WithPostHogUrl<Schemas.FeatureFlag>
+> => ({
name: 'update-feature-flag',
- schema: UpdateFeatureFlagSchema,
- handler: async (context: Context, params: z.infer<typeof UpdateFeatureFlagSchema>) => {
+ schema: UpdateFeatureFlagSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UpdateFeatureFlagSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.key !== undefined) {
diff --git a/services/mcp/src/tools/generated/field_notes.ts b/services/mcp/src/tools/generated/field_notes.ts
index 4e4e35e6baae..c0304d118355 100644
--- a/services/mcp/src/tools/generated/field_notes.ts
+++ b/services/mcp/src/tools/generated/field_notes.ts
@@ -2,21 +2,19 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- FieldNotesListQueryParams,
- FieldNotesPartialUpdateBody,
- FieldNotesPartialUpdateParams,
- FieldNotesRetrieveParams,
-} from '@/generated/field_notes/api'
+import * as orvalSchemas from '@/generated/field_notes/api'
import { withPostHogUrl, pickResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const FieldNotesGetSchema = FieldNotesRetrieveParams.omit({ project_id: true })
+const FieldNotesGetSchema = () => {
+ const FieldNotesRetrieveParams = orvalSchemas.FieldNotesRetrieveParams()
+ return FieldNotesRetrieveParams.omit({ project_id: true })
+}
-const fieldNotesGet = (): ToolBase<typeof FieldNotesGetSchema, Schemas.FieldNote> => ({
+const fieldNotesGet = (): ToolBase<ReturnType<typeof FieldNotesGetSchema>, Schemas.FieldNote> => ({
name: 'field-notes-get',
- schema: FieldNotesGetSchema,
- handler: async (context: Context, params: z.infer<typeof FieldNotesGetSchema>) => {
+ schema: FieldNotesGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FieldNotesGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.FieldNote>({
method: 'GET',
@@ -26,12 +24,18 @@ const fieldNotesGet = (): ToolBase<typeof FieldNotesGetSchema, Schemas.FieldNote
},
})
-const FieldNotesListSchema = FieldNotesListQueryParams
+const FieldNotesListSchema = () => {
+ const FieldNotesListQueryParams = orvalSchemas.FieldNotesListQueryParams()
+ return FieldNotesListQueryParams
+}
-const fieldNotesList = (): ToolBase<typeof FieldNotesListSchema, WithPostHogUrl<Schemas.PaginatedFieldNoteList>> => ({
+const fieldNotesList = (): ToolBase<
+ ReturnType<typeof FieldNotesListSchema>,
+ WithPostHogUrl<Schemas.PaginatedFieldNoteList>
+> => ({
name: 'field-notes-list',
- schema: FieldNotesListSchema,
- handler: async (context: Context, params: z.infer<typeof FieldNotesListSchema>) => {
+ schema: FieldNotesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FieldNotesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedFieldNoteList>({
method: 'GET',
@@ -66,14 +70,16 @@ const fieldNotesList = (): ToolBase<typeof FieldNotesListSchema, WithPostHogUrl<
},
})
-const FieldNotesPartialUpdateSchema = FieldNotesPartialUpdateParams.omit({ project_id: true }).extend(
- FieldNotesPartialUpdateBody.shape
-)
+const FieldNotesPartialUpdateSchema = () => {
+ const FieldNotesPartialUpdateBody = orvalSchemas.FieldNotesPartialUpdateBody()
+ const FieldNotesPartialUpdateParams = orvalSchemas.FieldNotesPartialUpdateParams()
+ return FieldNotesPartialUpdateParams.omit({ project_id: true }).extend(FieldNotesPartialUpdateBody.shape)
+}
-const fieldNotesPartialUpdate = (): ToolBase<typeof FieldNotesPartialUpdateSchema, Schemas.FieldNote> => ({
+const fieldNotesPartialUpdate = (): ToolBase<ReturnType<typeof FieldNotesPartialUpdateSchema>, Schemas.FieldNote> => ({
name: 'field-notes-partial-update',
- schema: FieldNotesPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof FieldNotesPartialUpdateSchema>) => {
+ schema: FieldNotesPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof FieldNotesPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.comment !== undefined) {
diff --git a/services/mcp/src/tools/generated/health_issues.ts b/services/mcp/src/tools/generated/health_issues.ts
index ffed524d74ec..28511bd6dd4d 100644
--- a/services/mcp/src/tools/generated/health_issues.ts
+++ b/services/mcp/src/tools/generated/health_issues.ts
@@ -2,16 +2,19 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import { HealthIssuesListQueryParams, HealthIssuesRetrieveParams } from '@/generated/health_issues/api'
+import * as orvalSchemas from '@/generated/health_issues/api'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const HealthIssuesGetSchema = HealthIssuesRetrieveParams.omit({ project_id: true })
+const HealthIssuesGetSchema = () => {
+ const HealthIssuesRetrieveParams = orvalSchemas.HealthIssuesRetrieveParams()
+ return HealthIssuesRetrieveParams.omit({ project_id: true })
+}
-const healthIssuesGet = (): ToolBase<typeof HealthIssuesGetSchema, Schemas.HealthIssueDetail> => ({
+const healthIssuesGet = (): ToolBase<ReturnType<typeof HealthIssuesGetSchema>, Schemas.HealthIssueDetail> => ({
name: 'health-issues-get',
- schema: HealthIssuesGetSchema,
- handler: async (context: Context, params: z.infer<typeof HealthIssuesGetSchema>) => {
+ schema: HealthIssuesGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof HealthIssuesGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.HealthIssueDetail>({
method: 'GET',
@@ -21,15 +24,18 @@ const healthIssuesGet = (): ToolBase<typeof HealthIssuesGetSchema, Schemas.Healt
},
})
-const HealthIssuesListSchema = HealthIssuesListQueryParams
+const HealthIssuesListSchema = () => {
+ const HealthIssuesListQueryParams = orvalSchemas.HealthIssuesListQueryParams()
+ return HealthIssuesListQueryParams
+}
const healthIssuesList = (): ToolBase<
- typeof HealthIssuesListSchema,
+ ReturnType<typeof HealthIssuesListSchema>,
WithPostHogUrl<Schemas.PaginatedHealthIssueList>
> => ({
name: 'health-issues-list',
- schema: HealthIssuesListSchema,
- handler: async (context: Context, params: z.infer<typeof HealthIssuesListSchema>) => {
+ schema: HealthIssuesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof HealthIssuesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedHealthIssueList>({
method: 'GET',
@@ -47,13 +53,12 @@ const healthIssuesList = (): ToolBase<
},
})
-const HealthIssuesSummarySchema = z.object({})
+const HealthIssuesSummarySchema = () => z.object({})
-const healthIssuesSummary = (): ToolBase<typeof HealthIssuesSummarySchema, Schemas.HealthIssueSummary> => ({
+const healthIssuesSummary = (): ToolBase<ReturnType<typeof HealthIssuesSummarySchema>, Schemas.HealthIssueSummary> => ({
name: 'health-issues-summary',
- schema: HealthIssuesSummarySchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof HealthIssuesSummarySchema>) => {
+ schema: HealthIssuesSummarySchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof HealthIssuesSummarySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.HealthIssueSummary>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/integrations.ts b/services/mcp/src/tools/generated/integrations.ts
index 6ad5c47ce239..bff2b1cd8634 100644
--- a/services/mcp/src/tools/generated/integrations.ts
+++ b/services/mcp/src/tools/generated/integrations.ts
@@ -2,30 +2,19 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- IntegrationsChannelsRetrieveParams,
- IntegrationsChannelsRetrieveQueryParams,
- IntegrationsDestroyParams,
- IntegrationsGithubReposRetrieveParams,
- IntegrationsGithubReposRetrieveQueryParams,
- IntegrationsJiraProjectsRetrieveParams,
- IntegrationsLinearTeamsRetrieveParams,
- IntegrationsListQueryParams,
- IntegrationsRetrieveParams,
- IntegrationsUsersRetrieveParams,
- IntegrationsUsersRetrieveQueryParams,
- PosthogConnectionsForwardCreateBody,
- PosthogConnectionsForwardCreateParams,
-} from '@/generated/integrations/api'
+import * as orvalSchemas from '@/generated/integrations/api'
import { withPostHogUrl, pickResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const IntegrationDeleteSchema = IntegrationsDestroyParams.omit({ project_id: true })
+const IntegrationDeleteSchema = () => {
+ const IntegrationsDestroyParams = orvalSchemas.IntegrationsDestroyParams()
+ return IntegrationsDestroyParams.omit({ project_id: true })
+}
-const integrationDelete = (): ToolBase<typeof IntegrationDeleteSchema, unknown> => ({
+const integrationDelete = (): ToolBase<ReturnType<typeof IntegrationDeleteSchema>, unknown> => ({
name: 'integration-delete',
- schema: IntegrationDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof IntegrationDeleteSchema>) => {
+ schema: IntegrationDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof IntegrationDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -35,12 +24,15 @@ const integrationDelete = (): ToolBase<typeof IntegrationDeleteSchema, unknown>
},
})
-const IntegrationGetSchema = IntegrationsRetrieveParams.omit({ project_id: true })
+const IntegrationGetSchema = () => {
+ const IntegrationsRetrieveParams = orvalSchemas.IntegrationsRetrieveParams()
+ return IntegrationsRetrieveParams.omit({ project_id: true })
+}
-const integrationGet = (): ToolBase<typeof IntegrationGetSchema, Schemas.IntegrationConfig> => ({
+const integrationGet = (): ToolBase<ReturnType<typeof IntegrationGetSchema>, Schemas.IntegrationConfig> => ({
name: 'integration-get',
- schema: IntegrationGetSchema,
- handler: async (context: Context, params: z.infer<typeof IntegrationGetSchema>) => {
+ schema: IntegrationGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof IntegrationGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.IntegrationConfig>({
method: 'GET',
@@ -58,17 +50,21 @@ const integrationGet = (): ToolBase<typeof IntegrationGetSchema, Schemas.Integra
},
})
-const IntegrationsChannelsRetrieveSchema = IntegrationsChannelsRetrieveParams.omit({ project_id: true }).extend(
- IntegrationsChannelsRetrieveQueryParams.shape
-)
+const IntegrationsChannelsRetrieveSchema = () => {
+ const IntegrationsChannelsRetrieveParams = orvalSchemas.IntegrationsChannelsRetrieveParams()
+ const IntegrationsChannelsRetrieveQueryParams = orvalSchemas.IntegrationsChannelsRetrieveQueryParams()
+ return IntegrationsChannelsRetrieveParams.omit({ project_id: true }).extend(
+ IntegrationsChannelsRetrieveQueryParams.shape
+ )
+}
const integrationsChannelsRetrieve = (): ToolBase<
- typeof IntegrationsChannelsRetrieveSchema,
+ ReturnType<typeof IntegrationsChannelsRetrieveSchema>,
Schemas.SlackChannelsResponse
> => ({
name: 'integrations-channels-retrieve',
- schema: IntegrationsChannelsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof IntegrationsChannelsRetrieveSchema>) => {
+ schema: IntegrationsChannelsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof IntegrationsChannelsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SlackChannelsResponse>({
method: 'GET',
@@ -83,17 +79,21 @@ const integrationsChannelsRetrieve = (): ToolBase<
},
})
-const IntegrationsGithubReposRetrieveSchema = IntegrationsGithubReposRetrieveParams.omit({ project_id: true }).extend(
- IntegrationsGithubReposRetrieveQueryParams.shape
-)
+const IntegrationsGithubReposRetrieveSchema = () => {
+ const IntegrationsGithubReposRetrieveParams = orvalSchemas.IntegrationsGithubReposRetrieveParams()
+ const IntegrationsGithubReposRetrieveQueryParams = orvalSchemas.IntegrationsGithubReposRetrieveQueryParams()
+ return IntegrationsGithubReposRetrieveParams.omit({ project_id: true }).extend(
+ IntegrationsGithubReposRetrieveQueryParams.shape
+ )
+}
const integrationsGithubReposRetrieve = (): ToolBase<
- typeof IntegrationsGithubReposRetrieveSchema,
+ ReturnType<typeof IntegrationsGithubReposRetrieveSchema>,
Schemas.GitHubReposResponse
> => ({
name: 'integrations-github-repos-retrieve',
- schema: IntegrationsGithubReposRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof IntegrationsGithubReposRetrieveSchema>) => {
+ schema: IntegrationsGithubReposRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof IntegrationsGithubReposRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.GitHubReposResponse>({
method: 'GET',
@@ -108,15 +108,18 @@ const integrationsGithubReposRetrieve = (): ToolBase<
},
})
-const IntegrationsJiraProjectsRetrieveSchema = IntegrationsJiraProjectsRetrieveParams.omit({ project_id: true })
+const IntegrationsJiraProjectsRetrieveSchema = () => {
+ const IntegrationsJiraProjectsRetrieveParams = orvalSchemas.IntegrationsJiraProjectsRetrieveParams()
+ return IntegrationsJiraProjectsRetrieveParams.omit({ project_id: true })
+}
const integrationsJiraProjectsRetrieve = (): ToolBase<
- typeof IntegrationsJiraProjectsRetrieveSchema,
+ ReturnType<typeof IntegrationsJiraProjectsRetrieveSchema>,
Schemas.JiraProjectsResponse
> => ({
name: 'integrations-jira-projects-retrieve',
- schema: IntegrationsJiraProjectsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof IntegrationsJiraProjectsRetrieveSchema>) => {
+ schema: IntegrationsJiraProjectsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof IntegrationsJiraProjectsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.JiraProjectsResponse>({
method: 'GET',
@@ -126,15 +129,18 @@ const integrationsJiraProjectsRetrieve = (): ToolBase<
},
})
-const IntegrationsLinearTeamsRetrieveSchema = IntegrationsLinearTeamsRetrieveParams.omit({ project_id: true })
+const IntegrationsLinearTeamsRetrieveSchema = () => {
+ const IntegrationsLinearTeamsRetrieveParams = orvalSchemas.IntegrationsLinearTeamsRetrieveParams()
+ return IntegrationsLinearTeamsRetrieveParams.omit({ project_id: true })
+}
const integrationsLinearTeamsRetrieve = (): ToolBase<
- typeof IntegrationsLinearTeamsRetrieveSchema,
+ ReturnType<typeof IntegrationsLinearTeamsRetrieveSchema>,
Schemas.LinearTeamsResponse
> => ({
name: 'integrations-linear-teams-retrieve',
- schema: IntegrationsLinearTeamsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof IntegrationsLinearTeamsRetrieveSchema>) => {
+ schema: IntegrationsLinearTeamsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof IntegrationsLinearTeamsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.LinearTeamsResponse>({
method: 'GET',
@@ -144,15 +150,18 @@ const integrationsLinearTeamsRetrieve = (): ToolBase<
},
})
-const IntegrationsListSchema = IntegrationsListQueryParams
+const IntegrationsListSchema = () => {
+ const IntegrationsListQueryParams = orvalSchemas.IntegrationsListQueryParams()
+ return IntegrationsListQueryParams
+}
const integrationsList = (): ToolBase<
- typeof IntegrationsListSchema,
+ ReturnType<typeof IntegrationsListSchema>,
WithPostHogUrl<Schemas.PaginatedIntegrationConfigList>
> => ({
name: 'integrations-list',
- schema: IntegrationsListSchema,
- handler: async (context: Context, params: z.infer<typeof IntegrationsListSchema>) => {
+ schema: IntegrationsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof IntegrationsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedIntegrationConfigList>({
method: 'GET',
@@ -173,14 +182,19 @@ const integrationsList = (): ToolBase<
},
})
-const IntegrationsUsersRetrieveSchema = IntegrationsUsersRetrieveParams.omit({ project_id: true }).extend(
- IntegrationsUsersRetrieveQueryParams.shape
-)
+const IntegrationsUsersRetrieveSchema = () => {
+ const IntegrationsUsersRetrieveParams = orvalSchemas.IntegrationsUsersRetrieveParams()
+ const IntegrationsUsersRetrieveQueryParams = orvalSchemas.IntegrationsUsersRetrieveQueryParams()
+ return IntegrationsUsersRetrieveParams.omit({ project_id: true }).extend(IntegrationsUsersRetrieveQueryParams.shape)
+}
-const integrationsUsersRetrieve = (): ToolBase<typeof IntegrationsUsersRetrieveSchema, Schemas.SlackUsersResponse> => ({
+const integrationsUsersRetrieve = (): ToolBase<
+ ReturnType<typeof IntegrationsUsersRetrieveSchema>,
+ Schemas.SlackUsersResponse
+> => ({
name: 'integrations-users-retrieve',
- schema: IntegrationsUsersRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof IntegrationsUsersRetrieveSchema>) => {
+ schema: IntegrationsUsersRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof IntegrationsUsersRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SlackUsersResponse>({
method: 'GET',
@@ -197,17 +211,21 @@ const integrationsUsersRetrieve = (): ToolBase<typeof IntegrationsUsersRetrieveS
},
})
-const PosthogConnectionForwardSchema = PosthogConnectionsForwardCreateParams.omit({ project_id: true }).extend(
- PosthogConnectionsForwardCreateBody.shape
-)
+const PosthogConnectionForwardSchema = () => {
+ const PosthogConnectionsForwardCreateBody = orvalSchemas.PosthogConnectionsForwardCreateBody()
+ const PosthogConnectionsForwardCreateParams = orvalSchemas.PosthogConnectionsForwardCreateParams()
+ return PosthogConnectionsForwardCreateParams.omit({ project_id: true }).extend(
+ PosthogConnectionsForwardCreateBody.shape
+ )
+}
const posthogConnectionForward = (): ToolBase<
- typeof PosthogConnectionForwardSchema,
+ ReturnType<typeof PosthogConnectionForwardSchema>,
Schemas.PostHogConnectionForwardResponse
> => ({
name: 'posthog-connection-forward',
- schema: PosthogConnectionForwardSchema,
- handler: async (context: Context, params: z.infer<typeof PosthogConnectionForwardSchema>) => {
+ schema: PosthogConnectionForwardSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof PosthogConnectionForwardSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.method !== undefined) {
diff --git a/services/mcp/src/tools/generated/logs.ts b/services/mcp/src/tools/generated/logs.ts
index 189a80408ea8..dceec66a1764 100644
--- a/services/mcp/src/tools/generated/logs.ts
+++ b/services/mcp/src/tools/generated/logs.ts
@@ -2,41 +2,19 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- LogsAlertsCreateBody,
- LogsAlertsDestinationsCreateBody,
- LogsAlertsDestinationsCreateParams,
- LogsAlertsDestinationsDeleteCreateBody,
- LogsAlertsDestinationsDeleteCreateParams,
- LogsAlertsDestroyParams,
- LogsAlertsEventsListParams,
- LogsAlertsEventsListQueryParams,
- LogsAlertsListQueryParams,
- LogsAlertsPartialUpdateBody,
- LogsAlertsPartialUpdateParams,
- LogsAlertsRetrieveParams,
- LogsAlertsSimulateCreateBody,
- LogsAnomaliesScanCreateBody,
- LogsAttributesRetrieveQueryParams,
- LogsCountCreateBody,
- LogsCountRangesCreateBody,
- LogsFacetValuesCreateBody,
- LogsPatternsCreateBody,
- LogsPatternsDiffCreateBody,
- LogsQueryCreateBody,
- LogsServicesCreateBody,
- LogsSparklineCreateBody,
- LogsValuesRetrieveQueryParams,
-} from '@/generated/logs/api'
+import * as orvalSchemas from '@/generated/logs/api'
import { withPostHogUrl, pickResponseFields, omitResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const LogsAlertsCreateSchema = LogsAlertsCreateBody
+const LogsAlertsCreateSchema = () => {
+ const LogsAlertsCreateBody = orvalSchemas.LogsAlertsCreateBody()
+ return LogsAlertsCreateBody
+}
-const logsAlertsCreate = (): ToolBase<typeof LogsAlertsCreateSchema, Schemas.LogsAlertConfiguration> => ({
+const logsAlertsCreate = (): ToolBase<ReturnType<typeof LogsAlertsCreateSchema>, Schemas.LogsAlertConfiguration> => ({
name: 'logs-alerts-create',
- schema: LogsAlertsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LogsAlertsCreateSchema>) => {
+ schema: LogsAlertsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsAlertsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -104,33 +82,37 @@ const logsAlertsCreate = (): ToolBase<typeof LogsAlertsCreateSchema, Schemas.Log
},
})
-const LogsAlertsDestinationsCreateSchema = LogsAlertsDestinationsCreateParams.omit({ project_id: true })
- .extend(LogsAlertsDestinationsCreateBody.shape)
- .extend({
- type: LogsAlertsDestinationsCreateBody.shape['type'].describe(
- 'Destination type. Use slack, webhook, or teams. Slack requires slack_workspace_id and slack_channel_id. Webhook and teams require webhook_url.'
- ),
- slack_workspace_id: LogsAlertsDestinationsCreateBody.shape['slack_workspace_id'].describe(
- 'Slack workspace integration ID. Required when type is slack.'
- ),
- slack_channel_id: LogsAlertsDestinationsCreateBody.shape['slack_channel_id'].describe(
- 'Slack channel ID. Required when type is slack.'
- ),
- slack_channel_name: LogsAlertsDestinationsCreateBody.shape['slack_channel_name'].describe(
- 'Optional Slack channel name used for display.'
- ),
- webhook_url: LogsAlertsDestinationsCreateBody.shape['webhook_url'].describe(
- 'Required when type is webhook or teams.'
- ),
- })
+const LogsAlertsDestinationsCreateSchema = () => {
+ const LogsAlertsDestinationsCreateBody = orvalSchemas.LogsAlertsDestinationsCreateBody()
+ const LogsAlertsDestinationsCreateParams = orvalSchemas.LogsAlertsDestinationsCreateParams()
+ return LogsAlertsDestinationsCreateParams.omit({ project_id: true })
+ .extend(LogsAlertsDestinationsCreateBody.shape)
+ .extend({
+ type: LogsAlertsDestinationsCreateBody.shape['type'].describe(
+ 'Destination type. Use slack, webhook, or teams. Slack requires slack_workspace_id and slack_channel_id. Webhook and teams require webhook_url.'
+ ),
+ slack_workspace_id: LogsAlertsDestinationsCreateBody.shape['slack_workspace_id'].describe(
+ 'Slack workspace integration ID. Required when type is slack.'
+ ),
+ slack_channel_id: LogsAlertsDestinationsCreateBody.shape['slack_channel_id'].describe(
+ 'Slack channel ID. Required when type is slack.'
+ ),
+ slack_channel_name: LogsAlertsDestinationsCreateBody.shape['slack_channel_name'].describe(
+ 'Optional Slack channel name used for display.'
+ ),
+ webhook_url: LogsAlertsDestinationsCreateBody.shape['webhook_url'].describe(
+ 'Required when type is webhook or teams.'
+ ),
+ })
+}
const logsAlertsDestinationsCreate = (): ToolBase<
- typeof LogsAlertsDestinationsCreateSchema,
+ ReturnType<typeof LogsAlertsDestinationsCreateSchema>,
Schemas.LogsAlertDestinationResponse
> => ({
name: 'logs-alerts-destinations-create',
- schema: LogsAlertsDestinationsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LogsAlertsDestinationsCreateSchema>) => {
+ schema: LogsAlertsDestinationsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsAlertsDestinationsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.type !== undefined) {
@@ -158,14 +140,21 @@ const logsAlertsDestinationsCreate = (): ToolBase<
},
})
-const LogsAlertsDestinationsDeleteCreateSchema = LogsAlertsDestinationsDeleteCreateParams.omit({
- project_id: true,
-}).extend(LogsAlertsDestinationsDeleteCreateBody.shape)
+const LogsAlertsDestinationsDeleteCreateSchema = () => {
+ const LogsAlertsDestinationsDeleteCreateBody = orvalSchemas.LogsAlertsDestinationsDeleteCreateBody()
+ const LogsAlertsDestinationsDeleteCreateParams = orvalSchemas.LogsAlertsDestinationsDeleteCreateParams()
+ return LogsAlertsDestinationsDeleteCreateParams.omit({ project_id: true }).extend(
+ LogsAlertsDestinationsDeleteCreateBody.shape
+ )
+}
-const logsAlertsDestinationsDeleteCreate = (): ToolBase<typeof LogsAlertsDestinationsDeleteCreateSchema, unknown> => ({
+const logsAlertsDestinationsDeleteCreate = (): ToolBase<
+ ReturnType<typeof LogsAlertsDestinationsDeleteCreateSchema>,
+ unknown
+> => ({
name: 'logs-alerts-destinations-delete-create',
- schema: LogsAlertsDestinationsDeleteCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LogsAlertsDestinationsDeleteCreateSchema>) => {
+ schema: LogsAlertsDestinationsDeleteCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsAlertsDestinationsDeleteCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.hog_function_ids !== undefined) {
@@ -180,12 +169,15 @@ const logsAlertsDestinationsDeleteCreate = (): ToolBase<typeof LogsAlertsDestina
},
})
-const LogsAlertsDestroySchema = LogsAlertsDestroyParams.omit({ project_id: true })
+const LogsAlertsDestroySchema = () => {
+ const LogsAlertsDestroyParams = orvalSchemas.LogsAlertsDestroyParams()
+ return LogsAlertsDestroyParams.omit({ project_id: true })
+}
-const logsAlertsDestroy = (): ToolBase<typeof LogsAlertsDestroySchema, unknown> => ({
+const logsAlertsDestroy = (): ToolBase<ReturnType<typeof LogsAlertsDestroySchema>, unknown> => ({
name: 'logs-alerts-destroy',
- schema: LogsAlertsDestroySchema,
- handler: async (context: Context, params: z.infer<typeof LogsAlertsDestroySchema>) => {
+ schema: LogsAlertsDestroySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsAlertsDestroySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -195,17 +187,19 @@ const logsAlertsDestroy = (): ToolBase<typeof LogsAlertsDestroySchema, unknown>
},
})
-const LogsAlertsEventsListSchema = LogsAlertsEventsListParams.omit({ project_id: true }).extend(
- LogsAlertsEventsListQueryParams.shape
-)
+const LogsAlertsEventsListSchema = () => {
+ const LogsAlertsEventsListParams = orvalSchemas.LogsAlertsEventsListParams()
+ const LogsAlertsEventsListQueryParams = orvalSchemas.LogsAlertsEventsListQueryParams()
+ return LogsAlertsEventsListParams.omit({ project_id: true }).extend(LogsAlertsEventsListQueryParams.shape)
+}
const logsAlertsEventsList = (): ToolBase<
- typeof LogsAlertsEventsListSchema,
+ ReturnType<typeof LogsAlertsEventsListSchema>,
WithPostHogUrl<Schemas.PaginatedLogsAlertEventList>
> => ({
name: 'logs-alerts-events-list',
- schema: LogsAlertsEventsListSchema,
- handler: async (context: Context, params: z.infer<typeof LogsAlertsEventsListSchema>) => {
+ schema: LogsAlertsEventsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsAlertsEventsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedLogsAlertEventList>({
method: 'GET',
@@ -235,15 +229,18 @@ const logsAlertsEventsList = (): ToolBase<
},
})
-const LogsAlertsListSchema = LogsAlertsListQueryParams
+const LogsAlertsListSchema = () => {
+ const LogsAlertsListQueryParams = orvalSchemas.LogsAlertsListQueryParams()
+ return LogsAlertsListQueryParams
+}
const logsAlertsList = (): ToolBase<
- typeof LogsAlertsListSchema,
+ ReturnType<typeof LogsAlertsListSchema>,
WithPostHogUrl<Schemas.PaginatedLogsAlertConfigurationList>
> => ({
name: 'logs-alerts-list',
- schema: LogsAlertsListSchema,
- handler: async (context: Context, params: z.infer<typeof LogsAlertsListSchema>) => {
+ schema: LogsAlertsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsAlertsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedLogsAlertConfigurationList>({
method: 'GET',
@@ -275,14 +272,19 @@ const logsAlertsList = (): ToolBase<
},
})
-const LogsAlertsPartialUpdateSchema = LogsAlertsPartialUpdateParams.omit({ project_id: true }).extend(
- LogsAlertsPartialUpdateBody.shape
-)
+const LogsAlertsPartialUpdateSchema = () => {
+ const LogsAlertsPartialUpdateBody = orvalSchemas.LogsAlertsPartialUpdateBody()
+ const LogsAlertsPartialUpdateParams = orvalSchemas.LogsAlertsPartialUpdateParams()
+ return LogsAlertsPartialUpdateParams.omit({ project_id: true }).extend(LogsAlertsPartialUpdateBody.shape)
+}
-const logsAlertsPartialUpdate = (): ToolBase<typeof LogsAlertsPartialUpdateSchema, Schemas.LogsAlertConfiguration> => ({
+const logsAlertsPartialUpdate = (): ToolBase<
+ ReturnType<typeof LogsAlertsPartialUpdateSchema>,
+ Schemas.LogsAlertConfiguration
+> => ({
name: 'logs-alerts-partial-update',
- schema: LogsAlertsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof LogsAlertsPartialUpdateSchema>) => {
+ schema: LogsAlertsPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsAlertsPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -350,12 +352,18 @@ const logsAlertsPartialUpdate = (): ToolBase<typeof LogsAlertsPartialUpdateSchem
},
})
-const LogsAlertsRetrieveSchema = LogsAlertsRetrieveParams.omit({ project_id: true })
+const LogsAlertsRetrieveSchema = () => {
+ const LogsAlertsRetrieveParams = orvalSchemas.LogsAlertsRetrieveParams()
+ return LogsAlertsRetrieveParams.omit({ project_id: true })
+}
-const logsAlertsRetrieve = (): ToolBase<typeof LogsAlertsRetrieveSchema, Schemas.LogsAlertConfigurationDetail> => ({
+const logsAlertsRetrieve = (): ToolBase<
+ ReturnType<typeof LogsAlertsRetrieveSchema>,
+ Schemas.LogsAlertConfigurationDetail
+> => ({
name: 'logs-alerts-retrieve',
- schema: LogsAlertsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof LogsAlertsRetrieveSchema>) => {
+ schema: LogsAlertsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsAlertsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.LogsAlertConfigurationDetail>({
method: 'GET',
@@ -388,15 +396,18 @@ const logsAlertsRetrieve = (): ToolBase<typeof LogsAlertsRetrieveSchema, Schemas
},
})
-const LogsAlertsSimulateCreateSchema = LogsAlertsSimulateCreateBody
+const LogsAlertsSimulateCreateSchema = () => {
+ const LogsAlertsSimulateCreateBody = orvalSchemas.LogsAlertsSimulateCreateBody()
+ return LogsAlertsSimulateCreateBody
+}
const logsAlertsSimulateCreate = (): ToolBase<
- typeof LogsAlertsSimulateCreateSchema,
+ ReturnType<typeof LogsAlertsSimulateCreateSchema>,
Schemas.LogsAlertSimulateResponse
> => ({
name: 'logs-alerts-simulate-create',
- schema: LogsAlertsSimulateCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LogsAlertsSimulateCreateSchema>) => {
+ schema: LogsAlertsSimulateCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsAlertsSimulateCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.filters !== undefined) {
@@ -443,12 +454,18 @@ const logsAlertsSimulateCreate = (): ToolBase<
},
})
-const LogsAnomaliesScanSchema = LogsAnomaliesScanCreateBody
+const LogsAnomaliesScanSchema = () => {
+ const LogsAnomaliesScanCreateBody = orvalSchemas.LogsAnomaliesScanCreateBody()
+ return LogsAnomaliesScanCreateBody
+}
-const logsAnomaliesScan = (): ToolBase<typeof LogsAnomaliesScanSchema, Schemas.LogsAnomalyScanResponse> => ({
+const logsAnomaliesScan = (): ToolBase<
+ ReturnType<typeof LogsAnomaliesScanSchema>,
+ Schemas.LogsAnomalyScanResponse
+> => ({
name: 'logs-anomalies-scan',
- schema: LogsAnomaliesScanSchema,
- handler: async (context: Context, params: z.infer<typeof LogsAnomaliesScanSchema>) => {
+ schema: LogsAnomaliesScanSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsAnomaliesScanSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.serviceName !== undefined) {
@@ -467,12 +484,18 @@ const logsAnomaliesScan = (): ToolBase<typeof LogsAnomaliesScanSchema, Schemas.L
},
})
-const LogsAttributeValuesListSchema = LogsValuesRetrieveQueryParams
+const LogsAttributeValuesListSchema = () => {
+ const LogsValuesRetrieveQueryParams = orvalSchemas.LogsValuesRetrieveQueryParams()
+ return LogsValuesRetrieveQueryParams
+}
-const logsAttributeValuesList = (): ToolBase<typeof LogsAttributeValuesListSchema, Schemas._LogsValuesResponse> => ({
+const logsAttributeValuesList = (): ToolBase<
+ ReturnType<typeof LogsAttributeValuesListSchema>,
+ Schemas._LogsValuesResponse
+> => ({
name: 'logs-attribute-values-list',
- schema: LogsAttributeValuesListSchema,
- handler: async (context: Context, params: z.infer<typeof LogsAttributeValuesListSchema>) => {
+ schema: LogsAttributeValuesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsAttributeValuesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas._LogsValuesResponse>({
method: 'GET',
@@ -491,12 +514,18 @@ const logsAttributeValuesList = (): ToolBase<typeof LogsAttributeValuesListSchem
},
})
-const LogsAttributesListSchema = LogsAttributesRetrieveQueryParams
+const LogsAttributesListSchema = () => {
+ const LogsAttributesRetrieveQueryParams = orvalSchemas.LogsAttributesRetrieveQueryParams()
+ return LogsAttributesRetrieveQueryParams
+}
-const logsAttributesList = (): ToolBase<typeof LogsAttributesListSchema, Schemas._LogsAttributesResponse> => ({
+const logsAttributesList = (): ToolBase<
+ ReturnType<typeof LogsAttributesListSchema>,
+ Schemas._LogsAttributesResponse
+> => ({
name: 'logs-attributes-list',
- schema: LogsAttributesListSchema,
- handler: async (context: Context, params: z.infer<typeof LogsAttributesListSchema>) => {
+ schema: LogsAttributesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsAttributesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas._LogsAttributesResponse>({
method: 'GET',
@@ -517,12 +546,15 @@ const logsAttributesList = (): ToolBase<typeof LogsAttributesListSchema, Schemas
},
})
-const LogsCountSchema = LogsCountCreateBody
+const LogsCountSchema = () => {
+ const LogsCountCreateBody = orvalSchemas.LogsCountCreateBody()
+ return LogsCountCreateBody
+}
-const logsCount = (): ToolBase<typeof LogsCountSchema, Schemas._LogsCountResponse> => ({
+const logsCount = (): ToolBase<ReturnType<typeof LogsCountSchema>, Schemas._LogsCountResponse> => ({
name: 'logs-count',
- schema: LogsCountSchema,
- handler: async (context: Context, params: z.infer<typeof LogsCountSchema>) => {
+ schema: LogsCountSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsCountSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
@@ -538,12 +570,15 @@ const logsCount = (): ToolBase<typeof LogsCountSchema, Schemas._LogsCountRespons
},
})
-const LogsCountRangesSchema = LogsCountRangesCreateBody
+const LogsCountRangesSchema = () => {
+ const LogsCountRangesCreateBody = orvalSchemas.LogsCountRangesCreateBody()
+ return LogsCountRangesCreateBody
+}
-const logsCountRanges = (): ToolBase<typeof LogsCountRangesSchema, Schemas._LogsCountRangesResponse> => ({
+const logsCountRanges = (): ToolBase<ReturnType<typeof LogsCountRangesSchema>, Schemas._LogsCountRangesResponse> => ({
name: 'logs-count-ranges',
- schema: LogsCountRangesSchema,
- handler: async (context: Context, params: z.infer<typeof LogsCountRangesSchema>) => {
+ schema: LogsCountRangesSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsCountRangesSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
@@ -559,12 +594,18 @@ const logsCountRanges = (): ToolBase<typeof LogsCountRangesSchema, Schemas._Logs
},
})
-const LogsFacetValuesCreateSchema = LogsFacetValuesCreateBody
+const LogsFacetValuesCreateSchema = () => {
+ const LogsFacetValuesCreateBody = orvalSchemas.LogsFacetValuesCreateBody()
+ return LogsFacetValuesCreateBody
+}
-const logsFacetValuesCreate = (): ToolBase<typeof LogsFacetValuesCreateSchema, Schemas._LogsFacetValuesResponse> => ({
+const logsFacetValuesCreate = (): ToolBase<
+ ReturnType<typeof LogsFacetValuesCreateSchema>,
+ Schemas._LogsFacetValuesResponse
+> => ({
name: 'logs-facet-values-create',
- schema: LogsFacetValuesCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LogsFacetValuesCreateSchema>) => {
+ schema: LogsFacetValuesCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsFacetValuesCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
@@ -580,12 +621,15 @@ const logsFacetValuesCreate = (): ToolBase<typeof LogsFacetValuesCreateSchema, S
},
})
-const LogsPatternsSchema = LogsPatternsCreateBody
+const LogsPatternsSchema = () => {
+ const LogsPatternsCreateBody = orvalSchemas.LogsPatternsCreateBody()
+ return LogsPatternsCreateBody
+}
-const logsPatterns = (): ToolBase<typeof LogsPatternsSchema, Schemas._LogsPatternsResponse> => ({
+const logsPatterns = (): ToolBase<ReturnType<typeof LogsPatternsSchema>, Schemas._LogsPatternsResponse> => ({
name: 'logs-patterns',
- schema: LogsPatternsSchema,
- handler: async (context: Context, params: z.infer<typeof LogsPatternsSchema>) => {
+ schema: LogsPatternsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsPatternsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
@@ -607,12 +651,18 @@ const logsPatterns = (): ToolBase<typeof LogsPatternsSchema, Schemas._LogsPatter
},
})
-const LogsPatternsDiffSchema = LogsPatternsDiffCreateBody
+const LogsPatternsDiffSchema = () => {
+ const LogsPatternsDiffCreateBody = orvalSchemas.LogsPatternsDiffCreateBody()
+ return LogsPatternsDiffCreateBody
+}
-const logsPatternsDiff = (): ToolBase<typeof LogsPatternsDiffSchema, Schemas._LogsPatternsDiffResponse> => ({
+const logsPatternsDiff = (): ToolBase<
+ ReturnType<typeof LogsPatternsDiffSchema>,
+ Schemas._LogsPatternsDiffResponse
+> => ({
name: 'logs-patterns-diff',
- schema: LogsPatternsDiffSchema,
- handler: async (context: Context, params: z.infer<typeof LogsPatternsDiffSchema>) => {
+ schema: LogsPatternsDiffSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsPatternsDiffSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
@@ -636,12 +686,18 @@ const logsPatternsDiff = (): ToolBase<typeof LogsPatternsDiffSchema, Schemas._Lo
},
})
-const LogsServicesCreateSchema = LogsServicesCreateBody
+const LogsServicesCreateSchema = () => {
+ const LogsServicesCreateBody = orvalSchemas.LogsServicesCreateBody()
+ return LogsServicesCreateBody
+}
-const logsServicesCreate = (): ToolBase<typeof LogsServicesCreateSchema, Schemas._LogsServicesResponse> => ({
+const logsServicesCreate = (): ToolBase<
+ ReturnType<typeof LogsServicesCreateSchema>,
+ Schemas._LogsServicesResponse
+> => ({
name: 'logs-services-create',
- schema: LogsServicesCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LogsServicesCreateSchema>) => {
+ schema: LogsServicesCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsServicesCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
@@ -657,12 +713,18 @@ const logsServicesCreate = (): ToolBase<typeof LogsServicesCreateSchema, Schemas
},
})
-const LogsSparklineQuerySchema = LogsSparklineCreateBody
+const LogsSparklineQuerySchema = () => {
+ const LogsSparklineCreateBody = orvalSchemas.LogsSparklineCreateBody()
+ return LogsSparklineCreateBody
+}
-const logsSparklineQuery = (): ToolBase<typeof LogsSparklineQuerySchema, Schemas._LogsSparklineResponse> => ({
+const logsSparklineQuery = (): ToolBase<
+ ReturnType<typeof LogsSparklineQuerySchema>,
+ Schemas._LogsSparklineResponse
+> => ({
name: 'logs-sparkline-query',
- schema: LogsSparklineQuerySchema,
- handler: async (context: Context, params: z.infer<typeof LogsSparklineQuerySchema>) => {
+ schema: LogsSparklineQuerySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LogsSparklineQuerySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
@@ -678,12 +740,15 @@ const logsSparklineQuery = (): ToolBase<typeof LogsSparklineQuerySchema, Schemas
},
})
-const QueryLogsSchema = LogsQueryCreateBody
+const QueryLogsSchema = () => {
+ const LogsQueryCreateBody = orvalSchemas.LogsQueryCreateBody()
+ return LogsQueryCreateBody
+}
-const queryLogs = (): ToolBase<typeof QueryLogsSchema, Schemas._LogsQueryResponse> => ({
+const queryLogs = (): ToolBase<ReturnType<typeof QueryLogsSchema>, Schemas._LogsQueryResponse> => ({
name: 'query-logs',
- schema: QueryLogsSchema,
- handler: async (context: Context, params: z.infer<typeof QueryLogsSchema>) => {
+ schema: QueryLogsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof QueryLogsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
diff --git a/services/mcp/src/tools/generated/managed_migrations.ts b/services/mcp/src/tools/generated/managed_migrations.ts
index 2444f8505b3d..f598f082a0cc 100644
--- a/services/mcp/src/tools/generated/managed_migrations.ts
+++ b/services/mcp/src/tools/generated/managed_migrations.ts
@@ -2,22 +2,22 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- ManagedMigrationsSupportListQueryParams,
- ManagedMigrationsSupportRetrieveParams,
-} from '@/generated/managed_migrations/api'
+import * as orvalSchemas from '@/generated/managed_migrations/api'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const ManagedMigrationsSupportGetSchema = ManagedMigrationsSupportRetrieveParams
+const ManagedMigrationsSupportGetSchema = () => {
+ const ManagedMigrationsSupportRetrieveParams = orvalSchemas.ManagedMigrationsSupportRetrieveParams()
+ return ManagedMigrationsSupportRetrieveParams
+}
const managedMigrationsSupportGet = (): ToolBase<
- typeof ManagedMigrationsSupportGetSchema,
+ ReturnType<typeof ManagedMigrationsSupportGetSchema>,
Schemas.BatchImportSupportDetail
> => ({
name: 'managed-migrations-support-get',
- schema: ManagedMigrationsSupportGetSchema,
- handler: async (context: Context, params: z.infer<typeof ManagedMigrationsSupportGetSchema>) => {
+ schema: ManagedMigrationsSupportGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ManagedMigrationsSupportGetSchema>>) => {
const result = await context.api.request<Schemas.BatchImportSupportDetail>({
method: 'GET',
path: `/api/managed_migrations_support/${encodeURIComponent(String(params.id))}/`,
@@ -26,15 +26,18 @@ const managedMigrationsSupportGet = (): ToolBase<
},
})
-const ManagedMigrationsSupportListSchema = ManagedMigrationsSupportListQueryParams
+const ManagedMigrationsSupportListSchema = () => {
+ const ManagedMigrationsSupportListQueryParams = orvalSchemas.ManagedMigrationsSupportListQueryParams()
+ return ManagedMigrationsSupportListQueryParams
+}
const managedMigrationsSupportList = (): ToolBase<
- typeof ManagedMigrationsSupportListSchema,
+ ReturnType<typeof ManagedMigrationsSupportListSchema>,
WithPostHogUrl<Schemas.PaginatedBatchImportSupportListList>
> => ({
name: 'managed-migrations-support-list',
- schema: ManagedMigrationsSupportListSchema,
- handler: async (context: Context, params: z.infer<typeof ManagedMigrationsSupportListSchema>) => {
+ schema: ManagedMigrationsSupportListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ManagedMigrationsSupportListSchema>>) => {
const result = await context.api.request<Schemas.PaginatedBatchImportSupportListList>({
method: 'GET',
path: `/api/managed_migrations_support/`,
diff --git a/services/mcp/src/tools/generated/marketing_analytics.ts b/services/mcp/src/tools/generated/marketing_analytics.ts
index 91495a4d24e1..3464b7eeb9e0 100644
--- a/services/mcp/src/tools/generated/marketing_analytics.ts
+++ b/services/mcp/src/tools/generated/marketing_analytics.ts
@@ -2,30 +2,18 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- MarketingAnalyticsConversionGoalsCreateCreateBody,
- MarketingAnalyticsConversionGoalsDeleteDestroyParams,
- MarketingAnalyticsConversionGoalsUpdatePartialUpdateBody,
- MarketingAnalyticsConversionGoalsUpdatePartialUpdateParams,
- MarketingAnalyticsDataSourcesRetrieveQueryParams,
- MarketingAnalyticsDiagnoseRetrieveQueryParams,
- MarketingAnalyticsExplainConversionGoalRetrieveQueryParams,
- MarketingAnalyticsSuggestConversionGoalsRetrieveQueryParams,
- MarketingAnalyticsSuggestUtmMappingsRetrieveQueryParams,
- MarketingAnalyticsUtmAuditRetrieveQueryParams,
-} from '@/generated/marketing_analytics/api'
+import * as orvalSchemas from '@/generated/marketing_analytics/api'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const MarketingAnalyticsConversionGoalsSchema = z.object({})
+const MarketingAnalyticsConversionGoalsSchema = () => z.object({})
const marketingAnalyticsConversionGoals = (): ToolBase<
- typeof MarketingAnalyticsConversionGoalsSchema,
+ ReturnType<typeof MarketingAnalyticsConversionGoalsSchema>,
Schemas.ConversionGoalsListResponse
> => ({
name: 'marketing-analytics-conversion-goals',
- schema: MarketingAnalyticsConversionGoalsSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof MarketingAnalyticsConversionGoalsSchema>) => {
+ schema: MarketingAnalyticsConversionGoalsSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof MarketingAnalyticsConversionGoalsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ConversionGoalsListResponse>({
method: 'GET',
@@ -35,15 +23,22 @@ const marketingAnalyticsConversionGoals = (): ToolBase<
},
})
-const MarketingAnalyticsCreateConversionGoalSchema = MarketingAnalyticsConversionGoalsCreateCreateBody
+const MarketingAnalyticsCreateConversionGoalSchema = () => {
+ const MarketingAnalyticsConversionGoalsCreateCreateBody =
+ orvalSchemas.MarketingAnalyticsConversionGoalsCreateCreateBody()
+ return MarketingAnalyticsConversionGoalsCreateCreateBody
+}
const marketingAnalyticsCreateConversionGoal = (): ToolBase<
- typeof MarketingAnalyticsCreateConversionGoalSchema,
+ ReturnType<typeof MarketingAnalyticsCreateConversionGoalSchema>,
Schemas.ConversionGoalWriteResponse
> => ({
name: 'marketing-analytics-create-conversion-goal',
- schema: MarketingAnalyticsCreateConversionGoalSchema,
- handler: async (context: Context, params: z.infer<typeof MarketingAnalyticsCreateConversionGoalSchema>) => {
+ schema: MarketingAnalyticsCreateConversionGoalSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof MarketingAnalyticsCreateConversionGoalSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.goal !== undefined) {
@@ -58,15 +53,19 @@ const marketingAnalyticsCreateConversionGoal = (): ToolBase<
},
})
-const MarketingAnalyticsDataSourcesSchema = MarketingAnalyticsDataSourcesRetrieveQueryParams
+const MarketingAnalyticsDataSourcesSchema = () => {
+ const MarketingAnalyticsDataSourcesRetrieveQueryParams =
+ orvalSchemas.MarketingAnalyticsDataSourcesRetrieveQueryParams()
+ return MarketingAnalyticsDataSourcesRetrieveQueryParams
+}
const marketingAnalyticsDataSources = (): ToolBase<
- typeof MarketingAnalyticsDataSourcesSchema,
+ ReturnType<typeof MarketingAnalyticsDataSourcesSchema>,
Schemas.DataSourceHealthResponse
> => ({
name: 'marketing-analytics-data-sources',
- schema: MarketingAnalyticsDataSourcesSchema,
- handler: async (context: Context, params: z.infer<typeof MarketingAnalyticsDataSourcesSchema>) => {
+ schema: MarketingAnalyticsDataSourcesSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof MarketingAnalyticsDataSourcesSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.DataSourceHealthResponse>({
method: 'GET',
@@ -79,17 +78,22 @@ const marketingAnalyticsDataSources = (): ToolBase<
},
})
-const MarketingAnalyticsDeleteConversionGoalSchema = MarketingAnalyticsConversionGoalsDeleteDestroyParams.omit({
- project_id: true,
-})
+const MarketingAnalyticsDeleteConversionGoalSchema = () => {
+ const MarketingAnalyticsConversionGoalsDeleteDestroyParams =
+ orvalSchemas.MarketingAnalyticsConversionGoalsDeleteDestroyParams()
+ return MarketingAnalyticsConversionGoalsDeleteDestroyParams.omit({ project_id: true })
+}
const marketingAnalyticsDeleteConversionGoal = (): ToolBase<
- typeof MarketingAnalyticsDeleteConversionGoalSchema,
+ ReturnType<typeof MarketingAnalyticsDeleteConversionGoalSchema>,
Schemas.ConversionGoalWriteResponse
> => ({
name: 'marketing-analytics-delete-conversion-goal',
- schema: MarketingAnalyticsDeleteConversionGoalSchema,
- handler: async (context: Context, params: z.infer<typeof MarketingAnalyticsDeleteConversionGoalSchema>) => {
+ schema: MarketingAnalyticsDeleteConversionGoalSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof MarketingAnalyticsDeleteConversionGoalSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ConversionGoalWriteResponse>({
method: 'DELETE',
@@ -99,15 +103,18 @@ const marketingAnalyticsDeleteConversionGoal = (): ToolBase<
},
})
-const MarketingAnalyticsDiagnoseSchema = MarketingAnalyticsDiagnoseRetrieveQueryParams
+const MarketingAnalyticsDiagnoseSchema = () => {
+ const MarketingAnalyticsDiagnoseRetrieveQueryParams = orvalSchemas.MarketingAnalyticsDiagnoseRetrieveQueryParams()
+ return MarketingAnalyticsDiagnoseRetrieveQueryParams
+}
const marketingAnalyticsDiagnose = (): ToolBase<
- typeof MarketingAnalyticsDiagnoseSchema,
+ ReturnType<typeof MarketingAnalyticsDiagnoseSchema>,
Schemas.MarketingDiagnosticResponse
> => ({
name: 'marketing-analytics-diagnose',
- schema: MarketingAnalyticsDiagnoseSchema,
- handler: async (context: Context, params: z.infer<typeof MarketingAnalyticsDiagnoseSchema>) => {
+ schema: MarketingAnalyticsDiagnoseSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof MarketingAnalyticsDiagnoseSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.MarketingDiagnosticResponse>({
method: 'GET',
@@ -122,15 +129,22 @@ const marketingAnalyticsDiagnose = (): ToolBase<
},
})
-const MarketingAnalyticsExplainConversionGoalSchema = MarketingAnalyticsExplainConversionGoalRetrieveQueryParams
+const MarketingAnalyticsExplainConversionGoalSchema = () => {
+ const MarketingAnalyticsExplainConversionGoalRetrieveQueryParams =
+ orvalSchemas.MarketingAnalyticsExplainConversionGoalRetrieveQueryParams()
+ return MarketingAnalyticsExplainConversionGoalRetrieveQueryParams
+}
const marketingAnalyticsExplainConversionGoal = (): ToolBase<
- typeof MarketingAnalyticsExplainConversionGoalSchema,
+ ReturnType<typeof MarketingAnalyticsExplainConversionGoalSchema>,
Schemas.GoalExplanation
> => ({
name: 'marketing-analytics-explain-conversion-goal',
- schema: MarketingAnalyticsExplainConversionGoalSchema,
- handler: async (context: Context, params: z.infer<typeof MarketingAnalyticsExplainConversionGoalSchema>) => {
+ schema: MarketingAnalyticsExplainConversionGoalSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof MarketingAnalyticsExplainConversionGoalSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.GoalExplanation>({
method: 'GET',
@@ -145,15 +159,22 @@ const marketingAnalyticsExplainConversionGoal = (): ToolBase<
},
})
-const MarketingAnalyticsSuggestConversionGoalsSchema = MarketingAnalyticsSuggestConversionGoalsRetrieveQueryParams
+const MarketingAnalyticsSuggestConversionGoalsSchema = () => {
+ const MarketingAnalyticsSuggestConversionGoalsRetrieveQueryParams =
+ orvalSchemas.MarketingAnalyticsSuggestConversionGoalsRetrieveQueryParams()
+ return MarketingAnalyticsSuggestConversionGoalsRetrieveQueryParams
+}
const marketingAnalyticsSuggestConversionGoals = (): ToolBase<
- typeof MarketingAnalyticsSuggestConversionGoalsSchema,
+ ReturnType<typeof MarketingAnalyticsSuggestConversionGoalsSchema>,
Schemas.EventSuggestionsResponse
> => ({
name: 'marketing-analytics-suggest-conversion-goals',
- schema: MarketingAnalyticsSuggestConversionGoalsSchema,
- handler: async (context: Context, params: z.infer<typeof MarketingAnalyticsSuggestConversionGoalsSchema>) => {
+ schema: MarketingAnalyticsSuggestConversionGoalsSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof MarketingAnalyticsSuggestConversionGoalsSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.EventSuggestionsResponse>({
method: 'GET',
@@ -167,15 +188,22 @@ const marketingAnalyticsSuggestConversionGoals = (): ToolBase<
},
})
-const MarketingAnalyticsSuggestUtmMappingsSchema = MarketingAnalyticsSuggestUtmMappingsRetrieveQueryParams
+const MarketingAnalyticsSuggestUtmMappingsSchema = () => {
+ const MarketingAnalyticsSuggestUtmMappingsRetrieveQueryParams =
+ orvalSchemas.MarketingAnalyticsSuggestUtmMappingsRetrieveQueryParams()
+ return MarketingAnalyticsSuggestUtmMappingsRetrieveQueryParams
+}
const marketingAnalyticsSuggestUtmMappings = (): ToolBase<
- typeof MarketingAnalyticsSuggestUtmMappingsSchema,
+ ReturnType<typeof MarketingAnalyticsSuggestUtmMappingsSchema>,
Schemas.UtmMappingSuggestionsResponse
> => ({
name: 'marketing-analytics-suggest-utm-mappings',
- schema: MarketingAnalyticsSuggestUtmMappingsSchema,
- handler: async (context: Context, params: z.infer<typeof MarketingAnalyticsSuggestUtmMappingsSchema>) => {
+ schema: MarketingAnalyticsSuggestUtmMappingsSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof MarketingAnalyticsSuggestUtmMappingsSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.UtmMappingSuggestionsResponse>({
method: 'GET',
@@ -189,17 +217,26 @@ const marketingAnalyticsSuggestUtmMappings = (): ToolBase<
},
})
-const MarketingAnalyticsUpdateConversionGoalSchema = MarketingAnalyticsConversionGoalsUpdatePartialUpdateParams.omit({
- project_id: true,
-}).extend(MarketingAnalyticsConversionGoalsUpdatePartialUpdateBody.shape)
+const MarketingAnalyticsUpdateConversionGoalSchema = () => {
+ const MarketingAnalyticsConversionGoalsUpdatePartialUpdateBody =
+ orvalSchemas.MarketingAnalyticsConversionGoalsUpdatePartialUpdateBody()
+ const MarketingAnalyticsConversionGoalsUpdatePartialUpdateParams =
+ orvalSchemas.MarketingAnalyticsConversionGoalsUpdatePartialUpdateParams()
+ return MarketingAnalyticsConversionGoalsUpdatePartialUpdateParams.omit({ project_id: true }).extend(
+ MarketingAnalyticsConversionGoalsUpdatePartialUpdateBody.shape
+ )
+}
const marketingAnalyticsUpdateConversionGoal = (): ToolBase<
- typeof MarketingAnalyticsUpdateConversionGoalSchema,
+ ReturnType<typeof MarketingAnalyticsUpdateConversionGoalSchema>,
Schemas.ConversionGoalWriteResponse
> => ({
name: 'marketing-analytics-update-conversion-goal',
- schema: MarketingAnalyticsUpdateConversionGoalSchema,
- handler: async (context: Context, params: z.infer<typeof MarketingAnalyticsUpdateConversionGoalSchema>) => {
+ schema: MarketingAnalyticsUpdateConversionGoalSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof MarketingAnalyticsUpdateConversionGoalSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.goal !== undefined) {
@@ -214,12 +251,18 @@ const marketingAnalyticsUpdateConversionGoal = (): ToolBase<
},
})
-const MarketingAnalyticsUtmAuditSchema = MarketingAnalyticsUtmAuditRetrieveQueryParams
+const MarketingAnalyticsUtmAuditSchema = () => {
+ const MarketingAnalyticsUtmAuditRetrieveQueryParams = orvalSchemas.MarketingAnalyticsUtmAuditRetrieveQueryParams()
+ return MarketingAnalyticsUtmAuditRetrieveQueryParams
+}
-const marketingAnalyticsUtmAudit = (): ToolBase<typeof MarketingAnalyticsUtmAuditSchema, Schemas.UtmAuditResponse> => ({
+const marketingAnalyticsUtmAudit = (): ToolBase<
+ ReturnType<typeof MarketingAnalyticsUtmAuditSchema>,
+ Schemas.UtmAuditResponse
+> => ({
name: 'marketing-analytics-utm-audit',
- schema: MarketingAnalyticsUtmAuditSchema,
- handler: async (context: Context, params: z.infer<typeof MarketingAnalyticsUtmAuditSchema>) => {
+ schema: MarketingAnalyticsUtmAuditSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof MarketingAnalyticsUtmAuditSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.UtmAuditResponse>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/mcp_analytics.ts b/services/mcp/src/tools/generated/mcp_analytics.ts
index 57c3b0f961d7..ab661f8555d0 100644
--- a/services/mcp/src/tools/generated/mcp_analytics.ts
+++ b/services/mcp/src/tools/generated/mcp_analytics.ts
@@ -2,30 +2,23 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- McpAnalyticsFeedbackCreateBody,
- McpAnalyticsIntentClustersRetrieveQueryParams,
- McpAnalyticsMissingCapabilitiesCreateBody,
- McpAnalyticsSessionsGenerateIntentParams,
- McpAnalyticsSessionsGenerateIntentQueryParams,
- McpAnalyticsSessionsListQueryParams,
- McpAnalyticsSessionsToolCallsParams,
- McpAnalyticsSessionsToolCallsQueryParams,
-} from '@/generated/mcp_analytics/api'
+import * as orvalSchemas from '@/generated/mcp_analytics/api'
import { createQueryWrapper } from '@/tools/query-wrapper-factory'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const McpAnalyticsIntentClustersRecomputeSchema = z.object({})
+const McpAnalyticsIntentClustersRecomputeSchema = () => z.object({})
const mcpAnalyticsIntentClustersRecompute = (): ToolBase<
- typeof McpAnalyticsIntentClustersRecomputeSchema,
+ ReturnType<typeof McpAnalyticsIntentClustersRecomputeSchema>,
unknown
> => ({
name: 'mcp-analytics-intent-clusters-recompute',
- schema: McpAnalyticsIntentClustersRecomputeSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof McpAnalyticsIntentClustersRecomputeSchema>) => {
+ schema: McpAnalyticsIntentClustersRecomputeSchema(),
+ handler: async (
+ context: Context,
+ _params: z.infer<ReturnType<typeof McpAnalyticsIntentClustersRecomputeSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'POST',
@@ -35,15 +28,18 @@ const mcpAnalyticsIntentClustersRecompute = (): ToolBase<
},
})
-const McpAnalyticsIntentClustersRetrieveSchema = McpAnalyticsIntentClustersRetrieveQueryParams
+const McpAnalyticsIntentClustersRetrieveSchema = () => {
+ const McpAnalyticsIntentClustersRetrieveQueryParams = orvalSchemas.McpAnalyticsIntentClustersRetrieveQueryParams()
+ return McpAnalyticsIntentClustersRetrieveQueryParams
+}
const mcpAnalyticsIntentClustersRetrieve = (): ToolBase<
- typeof McpAnalyticsIntentClustersRetrieveSchema,
+ ReturnType<typeof McpAnalyticsIntentClustersRetrieveSchema>,
Schemas.MCPIntentClusterSnapshot[]
> => ({
name: 'mcp-analytics-intent-clusters-retrieve',
- schema: McpAnalyticsIntentClustersRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof McpAnalyticsIntentClustersRetrieveSchema>) => {
+ schema: McpAnalyticsIntentClustersRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof McpAnalyticsIntentClustersRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.MCPIntentClusterSnapshot[]>({
method: 'GET',
@@ -56,17 +52,21 @@ const mcpAnalyticsIntentClustersRetrieve = (): ToolBase<
},
})
-const McpAnalyticsSessionsGenerateIntentSchema = McpAnalyticsSessionsGenerateIntentParams.omit({
- project_id: true,
-}).extend(McpAnalyticsSessionsGenerateIntentQueryParams.shape)
+const McpAnalyticsSessionsGenerateIntentSchema = () => {
+ const McpAnalyticsSessionsGenerateIntentParams = orvalSchemas.McpAnalyticsSessionsGenerateIntentParams()
+ const McpAnalyticsSessionsGenerateIntentQueryParams = orvalSchemas.McpAnalyticsSessionsGenerateIntentQueryParams()
+ return McpAnalyticsSessionsGenerateIntentParams.omit({ project_id: true }).extend(
+ McpAnalyticsSessionsGenerateIntentQueryParams.shape
+ )
+}
const mcpAnalyticsSessionsGenerateIntent = (): ToolBase<
- typeof McpAnalyticsSessionsGenerateIntentSchema,
+ ReturnType<typeof McpAnalyticsSessionsGenerateIntentSchema>,
Schemas.MCPSessionIntent
> => ({
name: 'mcp-analytics-sessions-generate-intent',
- schema: McpAnalyticsSessionsGenerateIntentSchema,
- handler: async (context: Context, params: z.infer<typeof McpAnalyticsSessionsGenerateIntentSchema>) => {
+ schema: McpAnalyticsSessionsGenerateIntentSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof McpAnalyticsSessionsGenerateIntentSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.MCPSessionIntent>({
method: 'POST',
@@ -79,15 +79,18 @@ const mcpAnalyticsSessionsGenerateIntent = (): ToolBase<
},
})
-const McpAnalyticsSessionsListSchema = McpAnalyticsSessionsListQueryParams
+const McpAnalyticsSessionsListSchema = () => {
+ const McpAnalyticsSessionsListQueryParams = orvalSchemas.McpAnalyticsSessionsListQueryParams()
+ return McpAnalyticsSessionsListQueryParams
+}
const mcpAnalyticsSessionsList = (): ToolBase<
- typeof McpAnalyticsSessionsListSchema,
+ ReturnType<typeof McpAnalyticsSessionsListSchema>,
WithPostHogUrl<Schemas.PaginatedMCPSessionList>
> => ({
name: 'mcp-analytics-sessions-list',
- schema: McpAnalyticsSessionsListSchema,
- handler: async (context: Context, params: z.infer<typeof McpAnalyticsSessionsListSchema>) => {
+ schema: McpAnalyticsSessionsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof McpAnalyticsSessionsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedMCPSessionList>({
method: 'GET',
@@ -105,17 +108,21 @@ const mcpAnalyticsSessionsList = (): ToolBase<
},
})
-const McpAnalyticsSessionsToolCallsSchema = McpAnalyticsSessionsToolCallsParams.omit({ project_id: true }).extend(
- McpAnalyticsSessionsToolCallsQueryParams.shape
-)
+const McpAnalyticsSessionsToolCallsSchema = () => {
+ const McpAnalyticsSessionsToolCallsParams = orvalSchemas.McpAnalyticsSessionsToolCallsParams()
+ const McpAnalyticsSessionsToolCallsQueryParams = orvalSchemas.McpAnalyticsSessionsToolCallsQueryParams()
+ return McpAnalyticsSessionsToolCallsParams.omit({ project_id: true }).extend(
+ McpAnalyticsSessionsToolCallsQueryParams.shape
+ )
+}
const mcpAnalyticsSessionsToolCalls = (): ToolBase<
- typeof McpAnalyticsSessionsToolCallsSchema,
+ ReturnType<typeof McpAnalyticsSessionsToolCallsSchema>,
WithPostHogUrl<Schemas.PaginatedMCPToolCallList>
> => ({
name: 'mcp-analytics-sessions-tool-calls',
- schema: McpAnalyticsSessionsToolCallsSchema,
- handler: async (context: Context, params: z.infer<typeof McpAnalyticsSessionsToolCallsSchema>) => {
+ schema: McpAnalyticsSessionsToolCallsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof McpAnalyticsSessionsToolCallsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedMCPToolCallList>({
method: 'GET',
@@ -130,19 +137,22 @@ const mcpAnalyticsSessionsToolCalls = (): ToolBase<
},
})
-const McpFeedbackSubmitSchema = McpAnalyticsFeedbackCreateBody.omit({
- mcp_client_name: true,
- mcp_client_version: true,
- mcp_protocol_version: true,
- mcp_transport: true,
- mcp_session_id: true,
- mcp_trace_id: true,
-})
+const McpFeedbackSubmitSchema = () => {
+ const McpAnalyticsFeedbackCreateBody = orvalSchemas.McpAnalyticsFeedbackCreateBody()
+ return McpAnalyticsFeedbackCreateBody.omit({
+ mcp_client_name: true,
+ mcp_client_version: true,
+ mcp_protocol_version: true,
+ mcp_transport: true,
+ mcp_session_id: true,
+ mcp_trace_id: true,
+ })
+}
-const mcpFeedbackSubmit = (): ToolBase<typeof McpFeedbackSubmitSchema, Schemas.MCPAnalyticsSubmission> => ({
+const mcpFeedbackSubmit = (): ToolBase<ReturnType<typeof McpFeedbackSubmitSchema>, Schemas.MCPAnalyticsSubmission> => ({
name: 'mcp-feedback-submit',
- schema: McpFeedbackSubmitSchema,
- handler: async (context: Context, params: z.infer<typeof McpFeedbackSubmitSchema>) => {
+ schema: McpFeedbackSubmitSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof McpFeedbackSubmitSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.attempted_tool !== undefined) {
@@ -166,22 +176,25 @@ const mcpFeedbackSubmit = (): ToolBase<typeof McpFeedbackSubmitSchema, Schemas.M
},
})
-const McpMissingCapabilityReportSchema = McpAnalyticsMissingCapabilitiesCreateBody.omit({
- mcp_client_name: true,
- mcp_client_version: true,
- mcp_protocol_version: true,
- mcp_transport: true,
- mcp_session_id: true,
- mcp_trace_id: true,
-})
+const McpMissingCapabilityReportSchema = () => {
+ const McpAnalyticsMissingCapabilitiesCreateBody = orvalSchemas.McpAnalyticsMissingCapabilitiesCreateBody()
+ return McpAnalyticsMissingCapabilitiesCreateBody.omit({
+ mcp_client_name: true,
+ mcp_client_version: true,
+ mcp_protocol_version: true,
+ mcp_transport: true,
+ mcp_session_id: true,
+ mcp_trace_id: true,
+ })
+}
const mcpMissingCapabilityReport = (): ToolBase<
- typeof McpMissingCapabilityReportSchema,
+ ReturnType<typeof McpMissingCapabilityReportSchema>,
Schemas.MCPAnalyticsSubmission
> => ({
name: 'mcp-missing-capability-report',
- schema: McpMissingCapabilityReportSchema,
- handler: async (context: Context, params: z.infer<typeof McpMissingCapabilityReportSchema>) => {
+ schema: McpMissingCapabilityReportSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof McpMissingCapabilityReportSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.attempted_tool !== undefined) {
diff --git a/services/mcp/src/tools/generated/mcp_store.ts b/services/mcp/src/tools/generated/mcp_store.ts
index 3e5d7c0b4947..25e6f0db0026 100644
--- a/services/mcp/src/tools/generated/mcp_store.ts
+++ b/services/mcp/src/tools/generated/mcp_store.ts
@@ -2,22 +2,22 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- McpServerInstallationsListQueryParams,
- McpServerInstallationsToolsRetrieveParams,
-} from '@/generated/mcp_store/api'
+import * as orvalSchemas from '@/generated/mcp_store/api'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const McpConnectionToolsListSchema = McpServerInstallationsToolsRetrieveParams.omit({ project_id: true })
+const McpConnectionToolsListSchema = () => {
+ const McpServerInstallationsToolsRetrieveParams = orvalSchemas.McpServerInstallationsToolsRetrieveParams()
+ return McpServerInstallationsToolsRetrieveParams.omit({ project_id: true })
+}
const mcpConnectionToolsList = (): ToolBase<
- typeof McpConnectionToolsListSchema,
+ ReturnType<typeof McpConnectionToolsListSchema>,
WithPostHogUrl<Schemas.PaginatedMCPServerInstallationToolList>
> => ({
name: 'mcp-connection-tools-list',
- schema: McpConnectionToolsListSchema,
- handler: async (context: Context, params: z.infer<typeof McpConnectionToolsListSchema>) => {
+ schema: McpConnectionToolsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof McpConnectionToolsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedMCPServerInstallationToolList>({
method: 'GET',
@@ -27,15 +27,18 @@ const mcpConnectionToolsList = (): ToolBase<
},
})
-const McpConnectionsListSchema = McpServerInstallationsListQueryParams
+const McpConnectionsListSchema = () => {
+ const McpServerInstallationsListQueryParams = orvalSchemas.McpServerInstallationsListQueryParams()
+ return McpServerInstallationsListQueryParams
+}
const mcpConnectionsList = (): ToolBase<
- typeof McpConnectionsListSchema,
+ ReturnType<typeof McpConnectionsListSchema>,
WithPostHogUrl<Schemas.PaginatedMCPServerInstallationList>
> => ({
name: 'mcp-connections-list',
- schema: McpConnectionsListSchema,
- handler: async (context: Context, params: z.infer<typeof McpConnectionsListSchema>) => {
+ schema: McpConnectionsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof McpConnectionsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedMCPServerInstallationList>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/messaging.ts b/services/mcp/src/tools/generated/messaging.ts
index 295e9eb20e6a..2ae45ac41451 100644
--- a/services/mcp/src/tools/generated/messaging.ts
+++ b/services/mcp/src/tools/generated/messaging.ts
@@ -2,19 +2,18 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- MessagingPreferencesBulkAddOptOutsCreateBody,
- MessagingPreferencesOptOutsRetrieveQueryParams,
- MessagingPreferencesRemoveOptOutCreateBody,
-} from '@/generated/messaging/api'
+import * as orvalSchemas from '@/generated/messaging/api'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const OptOutsAddSchema = MessagingPreferencesBulkAddOptOutsCreateBody
+const OptOutsAddSchema = () => {
+ const MessagingPreferencesBulkAddOptOutsCreateBody = orvalSchemas.MessagingPreferencesBulkAddOptOutsCreateBody()
+ return MessagingPreferencesBulkAddOptOutsCreateBody
+}
-const optOutsAdd = (): ToolBase<typeof OptOutsAddSchema, Schemas.BulkAddOptOutsResult> => ({
+const optOutsAdd = (): ToolBase<ReturnType<typeof OptOutsAddSchema>, Schemas.BulkAddOptOutsResult> => ({
name: 'opt-outs-add',
- schema: OptOutsAddSchema,
- handler: async (context: Context, params: z.infer<typeof OptOutsAddSchema>) => {
+ schema: OptOutsAddSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof OptOutsAddSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.opt_outs !== undefined) {
@@ -32,12 +31,15 @@ const optOutsAdd = (): ToolBase<typeof OptOutsAddSchema, Schemas.BulkAddOptOutsR
},
})
-const OptOutsListSchema = MessagingPreferencesOptOutsRetrieveQueryParams
+const OptOutsListSchema = () => {
+ const MessagingPreferencesOptOutsRetrieveQueryParams = orvalSchemas.MessagingPreferencesOptOutsRetrieveQueryParams()
+ return MessagingPreferencesOptOutsRetrieveQueryParams
+}
-const optOutsList = (): ToolBase<typeof OptOutsListSchema, Schemas.PaginatedOptOuts> => ({
+const optOutsList = (): ToolBase<ReturnType<typeof OptOutsListSchema>, Schemas.PaginatedOptOuts> => ({
name: 'opt-outs-list',
- schema: OptOutsListSchema,
- handler: async (context: Context, params: z.infer<typeof OptOutsListSchema>) => {
+ schema: OptOutsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof OptOutsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedOptOuts>({
method: 'GET',
@@ -53,12 +55,15 @@ const optOutsList = (): ToolBase<typeof OptOutsListSchema, Schemas.PaginatedOptO
},
})
-const OptOutsRemoveSchema = MessagingPreferencesRemoveOptOutCreateBody
+const OptOutsRemoveSchema = () => {
+ const MessagingPreferencesRemoveOptOutCreateBody = orvalSchemas.MessagingPreferencesRemoveOptOutCreateBody()
+ return MessagingPreferencesRemoveOptOutCreateBody
+}
-const optOutsRemove = (): ToolBase<typeof OptOutsRemoveSchema, Schemas.MessagePreferences> => ({
+const optOutsRemove = (): ToolBase<ReturnType<typeof OptOutsRemoveSchema>, Schemas.MessagePreferences> => ({
name: 'opt-outs-remove',
- schema: OptOutsRemoveSchema,
- handler: async (context: Context, params: z.infer<typeof OptOutsRemoveSchema>) => {
+ schema: OptOutsRemoveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof OptOutsRemoveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.identifier !== undefined) {
diff --git a/services/mcp/src/tools/generated/metrics.ts b/services/mcp/src/tools/generated/metrics.ts
index 8488a41cca8f..942277b69db0 100644
--- a/services/mcp/src/tools/generated/metrics.ts
+++ b/services/mcp/src/tools/generated/metrics.ts
@@ -2,23 +2,22 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- MetricsCharacterizeCreateBody,
- MetricsQueryCreateBody,
- MetricsValuesRetrieveQueryParams,
-} from '@/generated/metrics/api'
+import * as orvalSchemas from '@/generated/metrics/api'
import { pickResponseFields } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const CharacterizeMetricAnomalySchema = MetricsCharacterizeCreateBody
+const CharacterizeMetricAnomalySchema = () => {
+ const MetricsCharacterizeCreateBody = orvalSchemas.MetricsCharacterizeCreateBody()
+ return MetricsCharacterizeCreateBody
+}
const characterizeMetricAnomaly = (): ToolBase<
- typeof CharacterizeMetricAnomalySchema,
+ ReturnType<typeof CharacterizeMetricAnomalySchema>,
Schemas._MetricAnomalyReport
> => ({
name: 'characterize-metric-anomaly',
- schema: CharacterizeMetricAnomalySchema,
- handler: async (context: Context, params: z.infer<typeof CharacterizeMetricAnomalySchema>) => {
+ schema: CharacterizeMetricAnomalySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CharacterizeMetricAnomalySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
@@ -33,12 +32,15 @@ const characterizeMetricAnomaly = (): ToolBase<
},
})
-const MetricNamesListSchema = MetricsValuesRetrieveQueryParams
+const MetricNamesListSchema = () => {
+ const MetricsValuesRetrieveQueryParams = orvalSchemas.MetricsValuesRetrieveQueryParams()
+ return MetricsValuesRetrieveQueryParams
+}
-const metricNamesList = (): ToolBase<typeof MetricNamesListSchema, Schemas._MetricNamesResponse> => ({
+const metricNamesList = (): ToolBase<ReturnType<typeof MetricNamesListSchema>, Schemas._MetricNamesResponse> => ({
name: 'metric-names-list',
- schema: MetricNamesListSchema,
- handler: async (context: Context, params: z.infer<typeof MetricNamesListSchema>) => {
+ schema: MetricNamesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof MetricNamesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas._MetricNamesResponse>({
method: 'GET',
@@ -54,12 +56,15 @@ const metricNamesList = (): ToolBase<typeof MetricNamesListSchema, Schemas._Metr
},
})
-const QueryMetricsSchema = MetricsQueryCreateBody
+const QueryMetricsSchema = () => {
+ const MetricsQueryCreateBody = orvalSchemas.MetricsQueryCreateBody()
+ return MetricsQueryCreateBody
+}
-const queryMetrics = (): ToolBase<typeof QueryMetricsSchema, Schemas._MetricQueryResponse> => ({
+const queryMetrics = (): ToolBase<ReturnType<typeof QueryMetricsSchema>, Schemas._MetricQueryResponse> => ({
name: 'query-metrics',
- schema: QueryMetricsSchema,
- handler: async (context: Context, params: z.infer<typeof QueryMetricsSchema>) => {
+ schema: QueryMetricsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof QueryMetricsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
diff --git a/services/mcp/src/tools/generated/notebooks.ts b/services/mcp/src/tools/generated/notebooks.ts
index c0b4cbd49733..38b0e9cf04bf 100644
--- a/services/mcp/src/tools/generated/notebooks.ts
+++ b/services/mcp/src/tools/generated/notebooks.ts
@@ -2,20 +2,7 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- NotebooksCreateBody,
- NotebooksDestroyParams,
- NotebooksKernelConfigCreateBody,
- NotebooksKernelConfigCreateParams,
- NotebooksKernelStatusRetrieveParams,
- NotebooksListQueryParams,
- NotebooksPartialUpdateBody,
- NotebooksPartialUpdateParams,
- NotebooksRetrieveParams,
- NotebooksSqlV2RunsInterruptCreateParams,
- NotebooksSqlV2RunsRetrieveParams,
- NotebooksSqlV2StateRetrieveParams,
-} from '@/generated/notebooks/api'
+import * as orvalSchemas from '@/generated/notebooks/api'
import {
withPostHogUrl,
withInformationalResponse,
@@ -26,17 +13,19 @@ import {
} from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const NotebooksConfigureComputeSchema = NotebooksKernelConfigCreateParams.omit({ project_id: true }).extend(
- NotebooksKernelConfigCreateBody.shape
-)
+const NotebooksConfigureComputeSchema = () => {
+ const NotebooksKernelConfigCreateBody = orvalSchemas.NotebooksKernelConfigCreateBody()
+ const NotebooksKernelConfigCreateParams = orvalSchemas.NotebooksKernelConfigCreateParams()
+ return NotebooksKernelConfigCreateParams.omit({ project_id: true }).extend(NotebooksKernelConfigCreateBody.shape)
+}
const notebooksConfigureCompute = (): ToolBase<
- typeof NotebooksConfigureComputeSchema,
+ ReturnType<typeof NotebooksConfigureComputeSchema>,
Schemas.NotebookKernelConfigResponse
> => ({
name: 'notebooks-configure-compute',
- schema: NotebooksConfigureComputeSchema,
- handler: async (context: Context, params: z.infer<typeof NotebooksConfigureComputeSchema>) => {
+ schema: NotebooksConfigureComputeSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof NotebooksConfigureComputeSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.cpu_cores !== undefined) {
@@ -57,12 +46,15 @@ const notebooksConfigureCompute = (): ToolBase<
},
})
-const NotebooksCreateSchema = NotebooksCreateBody
+const NotebooksCreateSchema = () => {
+ const NotebooksCreateBody = orvalSchemas.NotebooksCreateBody()
+ return NotebooksCreateBody
+}
-const notebooksCreate = (): ToolBase<typeof NotebooksCreateSchema, WithPostHogUrl<Schemas.Notebook>> => ({
+const notebooksCreate = (): ToolBase<ReturnType<typeof NotebooksCreateSchema>, WithPostHogUrl<Schemas.Notebook>> => ({
name: 'notebooks-create',
- schema: NotebooksCreateSchema,
- handler: async (context: Context, params: z.infer<typeof NotebooksCreateSchema>) => {
+ schema: NotebooksCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof NotebooksCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.title !== undefined) {
@@ -92,12 +84,15 @@ const notebooksCreate = (): ToolBase<typeof NotebooksCreateSchema, WithPostHogUr
},
})
-const NotebooksDestroySchema = NotebooksDestroyParams.omit({ project_id: true })
+const NotebooksDestroySchema = () => {
+ const NotebooksDestroyParams = orvalSchemas.NotebooksDestroyParams()
+ return NotebooksDestroyParams.omit({ project_id: true })
+}
-const notebooksDestroy = (): ToolBase<typeof NotebooksDestroySchema, Schemas.Notebook> => ({
+const notebooksDestroy = (): ToolBase<ReturnType<typeof NotebooksDestroySchema>, Schemas.Notebook> => ({
name: 'notebooks-destroy',
- schema: NotebooksDestroySchema,
- handler: async (context: Context, params: z.infer<typeof NotebooksDestroySchema>) => {
+ schema: NotebooksDestroySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof NotebooksDestroySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Notebook>({
method: 'PATCH',
@@ -108,15 +103,18 @@ const notebooksDestroy = (): ToolBase<typeof NotebooksDestroySchema, Schemas.Not
},
})
-const NotebooksGetSchema = NotebooksSqlV2StateRetrieveParams.omit({ project_id: true })
+const NotebooksGetSchema = () => {
+ const NotebooksSqlV2StateRetrieveParams = orvalSchemas.NotebooksSqlV2StateRetrieveParams()
+ return NotebooksSqlV2StateRetrieveParams.omit({ project_id: true })
+}
const notebooksGet = (): ToolBase<
- typeof NotebooksGetSchema,
+ ReturnType<typeof NotebooksGetSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.NotebookSQLV2StateResponse>>
> => ({
name: 'notebooks-get',
- schema: NotebooksGetSchema,
- handler: async (context: Context, params: z.infer<typeof NotebooksGetSchema>) => {
+ schema: NotebooksGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof NotebooksGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.NotebookSQLV2StateResponse>({
method: 'GET',
@@ -130,15 +128,18 @@ const notebooksGet = (): ToolBase<
},
})
-const NotebooksListSchema = NotebooksListQueryParams
+const NotebooksListSchema = () => {
+ const NotebooksListQueryParams = orvalSchemas.NotebooksListQueryParams()
+ return NotebooksListQueryParams
+}
const notebooksList = (): ToolBase<
- typeof NotebooksListSchema,
+ ReturnType<typeof NotebooksListSchema>,
WithPostHogUrl<Schemas.PaginatedNotebookMinimalList>
> => ({
name: 'notebooks-list',
- schema: NotebooksListSchema,
- handler: async (context: Context, params: z.infer<typeof NotebooksListSchema>) => {
+ schema: NotebooksListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof NotebooksListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedNotebookMinimalList>({
method: 'GET',
@@ -157,15 +158,18 @@ const notebooksList = (): ToolBase<
},
})
-const NotebooksListFramesSchema = NotebooksKernelStatusRetrieveParams.omit({ project_id: true })
+const NotebooksListFramesSchema = () => {
+ const NotebooksKernelStatusRetrieveParams = orvalSchemas.NotebooksKernelStatusRetrieveParams()
+ return NotebooksKernelStatusRetrieveParams.omit({ project_id: true })
+}
const notebooksListFrames = (): ToolBase<
- typeof NotebooksListFramesSchema,
+ ReturnType<typeof NotebooksListFramesSchema>,
WithInformationalResponse<Schemas.NotebookKernelStatusResponse>
> => ({
name: 'notebooks-list-frames',
- schema: NotebooksListFramesSchema,
- handler: async (context: Context, params: z.infer<typeof NotebooksListFramesSchema>) => {
+ schema: NotebooksListFramesSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof NotebooksListFramesSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.NotebookKernelStatusResponse>({
method: 'GET',
@@ -186,14 +190,19 @@ const notebooksListFrames = (): ToolBase<
},
})
-const NotebooksPartialUpdateSchema = NotebooksPartialUpdateParams.omit({ project_id: true }).extend(
- NotebooksPartialUpdateBody.shape
-)
+const NotebooksPartialUpdateSchema = () => {
+ const NotebooksPartialUpdateBody = orvalSchemas.NotebooksPartialUpdateBody()
+ const NotebooksPartialUpdateParams = orvalSchemas.NotebooksPartialUpdateParams()
+ return NotebooksPartialUpdateParams.omit({ project_id: true }).extend(NotebooksPartialUpdateBody.shape)
+}
-const notebooksPartialUpdate = (): ToolBase<typeof NotebooksPartialUpdateSchema, WithPostHogUrl<Schemas.Notebook>> => ({
+const notebooksPartialUpdate = (): ToolBase<
+ ReturnType<typeof NotebooksPartialUpdateSchema>,
+ WithPostHogUrl<Schemas.Notebook>
+> => ({
name: 'notebooks-partial-update',
- schema: NotebooksPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof NotebooksPartialUpdateSchema>) => {
+ schema: NotebooksPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof NotebooksPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.title !== undefined) {
@@ -223,12 +232,18 @@ const notebooksPartialUpdate = (): ToolBase<typeof NotebooksPartialUpdateSchema,
},
})
-const NotebooksRetrieveSchema = NotebooksRetrieveParams.omit({ project_id: true })
+const NotebooksRetrieveSchema = () => {
+ const NotebooksRetrieveParams = orvalSchemas.NotebooksRetrieveParams()
+ return NotebooksRetrieveParams.omit({ project_id: true })
+}
-const notebooksRetrieve = (): ToolBase<typeof NotebooksRetrieveSchema, WithPostHogUrl<Schemas.Notebook>> => ({
+const notebooksRetrieve = (): ToolBase<
+ ReturnType<typeof NotebooksRetrieveSchema>,
+ WithPostHogUrl<Schemas.Notebook>
+> => ({
name: 'notebooks-retrieve',
- schema: NotebooksRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof NotebooksRetrieveSchema>) => {
+ schema: NotebooksRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof NotebooksRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Notebook>({
method: 'GET',
@@ -238,15 +253,18 @@ const notebooksRetrieve = (): ToolBase<typeof NotebooksRetrieveSchema, WithPostH
},
})
-const NotebooksRunCellInterruptSchema = NotebooksSqlV2RunsInterruptCreateParams.omit({ project_id: true })
+const NotebooksRunCellInterruptSchema = () => {
+ const NotebooksSqlV2RunsInterruptCreateParams = orvalSchemas.NotebooksSqlV2RunsInterruptCreateParams()
+ return NotebooksSqlV2RunsInterruptCreateParams.omit({ project_id: true })
+}
const notebooksRunCellInterrupt = (): ToolBase<
- typeof NotebooksRunCellInterruptSchema,
+ ReturnType<typeof NotebooksRunCellInterruptSchema>,
Schemas.NotebookSQLV2InterruptResponse
> => ({
name: 'notebooks-run-cell-interrupt',
- schema: NotebooksRunCellInterruptSchema,
- handler: async (context: Context, params: z.infer<typeof NotebooksRunCellInterruptSchema>) => {
+ schema: NotebooksRunCellInterruptSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof NotebooksRunCellInterruptSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.NotebookSQLV2InterruptResponse>({
method: 'POST',
@@ -256,15 +274,18 @@ const notebooksRunCellInterrupt = (): ToolBase<
},
})
-const NotebooksRunCellResultSchema = NotebooksSqlV2RunsRetrieveParams.omit({ project_id: true })
+const NotebooksRunCellResultSchema = () => {
+ const NotebooksSqlV2RunsRetrieveParams = orvalSchemas.NotebooksSqlV2RunsRetrieveParams()
+ return NotebooksSqlV2RunsRetrieveParams.omit({ project_id: true })
+}
const notebooksRunCellResult = (): ToolBase<
- typeof NotebooksRunCellResultSchema,
+ ReturnType<typeof NotebooksRunCellResultSchema>,
WithInformationalResponse<Schemas.NotebookSQLV2RunStatusResponse>
> => ({
name: 'notebooks-run-cell-result',
- schema: NotebooksRunCellResultSchema,
- handler: async (context: Context, params: z.infer<typeof NotebooksRunCellResultSchema>) => {
+ schema: NotebooksRunCellResultSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof NotebooksRunCellResultSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.NotebookSQLV2RunStatusResponse>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/persons.ts b/services/mcp/src/tools/generated/persons.ts
index ba5bd69a3f77..1b9dcb834a3e 100644
--- a/services/mcp/src/tools/generated/persons.ts
+++ b/services/mcp/src/tools/generated/persons.ts
@@ -2,27 +2,20 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- PersonsBulkDeleteCreateBody,
- PersonsCohortsRetrieveQueryParams,
- PersonsDeletePropertyCreateBody,
- PersonsDeletePropertyCreateParams,
- PersonsListQueryParams,
- PersonsRetrieveParams,
- PersonsUpdatePropertyCreateBody,
- PersonsUpdatePropertyCreateParams,
- PersonsValuesRetrieveQueryParams,
-} from '@/generated/persons/api'
+import * as orvalSchemas from '@/generated/persons/api'
import { castStringToInt } from '@/tools/cast-helpers'
import { withPostHogUrl, pickResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const PersonsBulkDeleteSchema = PersonsBulkDeleteCreateBody
+const PersonsBulkDeleteSchema = () => {
+ const PersonsBulkDeleteCreateBody = orvalSchemas.PersonsBulkDeleteCreateBody()
+ return PersonsBulkDeleteCreateBody
+}
-const personsBulkDelete = (): ToolBase<typeof PersonsBulkDeleteSchema, unknown> => ({
+const personsBulkDelete = (): ToolBase<ReturnType<typeof PersonsBulkDeleteSchema>, unknown> => ({
name: 'persons-bulk-delete',
- schema: PersonsBulkDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof PersonsBulkDeleteSchema>) => {
+ schema: PersonsBulkDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof PersonsBulkDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.ids !== undefined) {
@@ -49,12 +42,15 @@ const personsBulkDelete = (): ToolBase<typeof PersonsBulkDeleteSchema, unknown>
},
})
-const PersonsCohortsRetrieveSchema = PersonsCohortsRetrieveQueryParams.omit({ format: true })
+const PersonsCohortsRetrieveSchema = () => {
+ const PersonsCohortsRetrieveQueryParams = orvalSchemas.PersonsCohortsRetrieveQueryParams()
+ return PersonsCohortsRetrieveQueryParams.omit({ format: true })
+}
-const personsCohortsRetrieve = (): ToolBase<typeof PersonsCohortsRetrieveSchema, unknown> => ({
+const personsCohortsRetrieve = (): ToolBase<ReturnType<typeof PersonsCohortsRetrieveSchema>, unknown> => ({
name: 'persons-cohorts-retrieve',
- schema: PersonsCohortsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof PersonsCohortsRetrieveSchema>) => {
+ schema: PersonsCohortsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof PersonsCohortsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'GET',
@@ -67,15 +63,21 @@ const personsCohortsRetrieve = (): ToolBase<typeof PersonsCohortsRetrieveSchema,
},
})
-const PersonsListSchema = PersonsListQueryParams.omit({ format: true, properties: true }).extend({
- limit: z.preprocess(castStringToInt, PersonsListQueryParams.shape['limit']).optional(),
- offset: z.preprocess(castStringToInt, PersonsListQueryParams.shape['offset']).optional(),
-})
+const PersonsListSchema = () => {
+ const PersonsListQueryParams = orvalSchemas.PersonsListQueryParams()
+ return PersonsListQueryParams.omit({ format: true, properties: true }).extend({
+ limit: z.preprocess(castStringToInt, PersonsListQueryParams.shape['limit']).optional(),
+ offset: z.preprocess(castStringToInt, PersonsListQueryParams.shape['offset']).optional(),
+ })
+}
-const personsList = (): ToolBase<typeof PersonsListSchema, WithPostHogUrl<Schemas.PaginatedPersonRecordList>> => ({
+const personsList = (): ToolBase<
+ ReturnType<typeof PersonsListSchema>,
+ WithPostHogUrl<Schemas.PaginatedPersonRecordList>
+> => ({
name: 'persons-list',
- schema: PersonsListSchema,
- handler: async (context: Context, params: z.infer<typeof PersonsListSchema>) => {
+ schema: PersonsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof PersonsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedPersonRecordList>({
method: 'GET',
@@ -109,15 +111,19 @@ const personsList = (): ToolBase<typeof PersonsListSchema, WithPostHogUrl<Schema
},
})
-const PersonsPropertyDeleteSchema = PersonsDeletePropertyCreateParams.omit({ project_id: true })
- .extend(PersonsDeletePropertyCreateBody.shape)
- .omit({ $unset: true })
- .extend({ unset: PersonsDeletePropertyCreateBody.shape['$unset'] })
+const PersonsPropertyDeleteSchema = () => {
+ const PersonsDeletePropertyCreateBody = orvalSchemas.PersonsDeletePropertyCreateBody()
+ const PersonsDeletePropertyCreateParams = orvalSchemas.PersonsDeletePropertyCreateParams()
+ return PersonsDeletePropertyCreateParams.omit({ project_id: true })
+ .extend(PersonsDeletePropertyCreateBody.shape)
+ .omit({ $unset: true })
+ .extend({ unset: PersonsDeletePropertyCreateBody.shape['$unset'] })
+}
-const personsPropertyDelete = (): ToolBase<typeof PersonsPropertyDeleteSchema, unknown> => ({
+const personsPropertyDelete = (): ToolBase<ReturnType<typeof PersonsPropertyDeleteSchema>, unknown> => ({
name: 'persons-property-delete',
- schema: PersonsPropertyDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof PersonsPropertyDeleteSchema>) => {
+ schema: PersonsPropertyDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof PersonsPropertyDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.unset !== undefined) {
@@ -132,14 +138,16 @@ const personsPropertyDelete = (): ToolBase<typeof PersonsPropertyDeleteSchema, u
},
})
-const PersonsPropertySetSchema = PersonsUpdatePropertyCreateParams.omit({ project_id: true }).extend(
- PersonsUpdatePropertyCreateBody.shape
-)
+const PersonsPropertySetSchema = () => {
+ const PersonsUpdatePropertyCreateBody = orvalSchemas.PersonsUpdatePropertyCreateBody()
+ const PersonsUpdatePropertyCreateParams = orvalSchemas.PersonsUpdatePropertyCreateParams()
+ return PersonsUpdatePropertyCreateParams.omit({ project_id: true }).extend(PersonsUpdatePropertyCreateBody.shape)
+}
-const personsPropertySet = (): ToolBase<typeof PersonsPropertySetSchema, unknown> => ({
+const personsPropertySet = (): ToolBase<ReturnType<typeof PersonsPropertySetSchema>, unknown> => ({
name: 'persons-property-set',
- schema: PersonsPropertySetSchema,
- handler: async (context: Context, params: z.infer<typeof PersonsPropertySetSchema>) => {
+ schema: PersonsPropertySetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof PersonsPropertySetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.key !== undefined) {
@@ -157,12 +165,18 @@ const personsPropertySet = (): ToolBase<typeof PersonsPropertySetSchema, unknown
},
})
-const PersonsRetrieveSchema = PersonsRetrieveParams.omit({ project_id: true })
+const PersonsRetrieveSchema = () => {
+ const PersonsRetrieveParams = orvalSchemas.PersonsRetrieveParams()
+ return PersonsRetrieveParams.omit({ project_id: true })
+}
-const personsRetrieve = (): ToolBase<typeof PersonsRetrieveSchema, WithPostHogUrl<Schemas.PersonRecord>> => ({
+const personsRetrieve = (): ToolBase<
+ ReturnType<typeof PersonsRetrieveSchema>,
+ WithPostHogUrl<Schemas.PersonRecord>
+> => ({
name: 'persons-retrieve',
- schema: PersonsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof PersonsRetrieveSchema>) => {
+ schema: PersonsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof PersonsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PersonRecord>({
method: 'GET',
@@ -181,12 +195,15 @@ const personsRetrieve = (): ToolBase<typeof PersonsRetrieveSchema, WithPostHogUr
},
})
-const PersonsValuesRetrieveSchema = PersonsValuesRetrieveQueryParams.omit({ format: true })
+const PersonsValuesRetrieveSchema = () => {
+ const PersonsValuesRetrieveQueryParams = orvalSchemas.PersonsValuesRetrieveQueryParams()
+ return PersonsValuesRetrieveQueryParams.omit({ format: true })
+}
-const personsValuesRetrieve = (): ToolBase<typeof PersonsValuesRetrieveSchema, unknown> => ({
+const personsValuesRetrieve = (): ToolBase<ReturnType<typeof PersonsValuesRetrieveSchema>, unknown> => ({
name: 'persons-values-retrieve',
- schema: PersonsValuesRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof PersonsValuesRetrieveSchema>) => {
+ schema: PersonsValuesRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof PersonsValuesRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/platform_features.ts b/services/mcp/src/tools/generated/platform_features.ts
index 4c903c64eac6..fbce74cbe2e5 100644
--- a/services/mcp/src/tools/generated/platform_features.ts
+++ b/services/mcp/src/tools/generated/platform_features.ts
@@ -2,34 +2,7 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- AdvancedActivityLogsListQueryParams,
- ApprovalPoliciesListQueryParams,
- ApprovalPoliciesRetrieveParams,
- ChangeRequestsApproveCreateBody,
- ChangeRequestsApproveCreateParams,
- ChangeRequestsListQueryParams,
- ChangeRequestsRejectCreateBody,
- ChangeRequestsRejectCreateParams,
- ChangeRequestsRetrieveParams,
- CommentsCreateBody,
- CommentsListQueryParams,
- CommentsRetrieveParams,
- CommentsThreadRetrieveParams,
- ListQueryParams,
- MembersGithubLoginRetrieveParams,
- MembersListQueryParams,
- PartialUpdateBody,
- PartialUpdateParams,
- RetrieveParams,
- RolesListQueryParams,
- RolesRetrieveParams,
- RolesRoleMembershipsListParams,
- RolesRoleMembershipsListQueryParams,
- UserHomeSettingsPartialUpdateBody,
- UserHomeSettingsPartialUpdateParams,
- UserHomeSettingsRetrieveParams,
-} from '@/generated/platform_features/api'
+import * as orvalSchemas from '@/generated/platform_features/api'
import { getConfirmedActionRuntime } from '@/tools/confirmed-action-registry'
import {
executeConfirmedAction,
@@ -45,16 +18,15 @@ import {
} from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const AdvancedActivityLogsFiltersSchema = z.object({})
+const AdvancedActivityLogsFiltersSchema = () => z.object({})
const advancedActivityLogsFilters = (): ToolBase<
- typeof AdvancedActivityLogsFiltersSchema,
+ ReturnType<typeof AdvancedActivityLogsFiltersSchema>,
Schemas.AvailableFiltersResponse
> => ({
name: 'advanced-activity-logs-filters',
- schema: AdvancedActivityLogsFiltersSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof AdvancedActivityLogsFiltersSchema>) => {
+ schema: AdvancedActivityLogsFiltersSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof AdvancedActivityLogsFiltersSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.AvailableFiltersResponse>({
method: 'GET',
@@ -64,41 +36,44 @@ const advancedActivityLogsFilters = (): ToolBase<
},
})
-const AdvancedActivityLogsListSchema = AdvancedActivityLogsListQueryParams.omit({ include_values: true, schema: true })
- .extend({ page_size: AdvancedActivityLogsListQueryParams.shape['page_size'].default(10).optional() })
- .extend({
- fields: z
- .array(
- z.enum([
- 'id',
- 'user.id',
- 'user.first_name',
- 'user.last_name',
- 'user.email',
- 'activity',
- 'scope',
- 'item_id',
- 'detail.name',
- 'detail.short_id',
- 'detail.type',
- 'detail.changes',
- 'created_at',
- ])
- )
- .min(1)
- .optional()
- .describe(
- 'Optional subset of response fields to return, each a dot-path from the allowlist. Omit to return all fields. Request only the fields your task needs to keep responses small.'
- ),
- })
+const AdvancedActivityLogsListSchema = () => {
+ const AdvancedActivityLogsListQueryParams = orvalSchemas.AdvancedActivityLogsListQueryParams()
+ return AdvancedActivityLogsListQueryParams.omit({ include_values: true, schema: true })
+ .extend({ page_size: AdvancedActivityLogsListQueryParams.shape['page_size'].default(10).optional() })
+ .extend({
+ fields: z
+ .array(
+ z.enum([
+ 'id',
+ 'user.id',
+ 'user.first_name',
+ 'user.last_name',
+ 'user.email',
+ 'activity',
+ 'scope',
+ 'item_id',
+ 'detail.name',
+ 'detail.short_id',
+ 'detail.type',
+ 'detail.changes',
+ 'created_at',
+ ])
+ )
+ .min(1)
+ .optional()
+ .describe(
+ 'Optional subset of response fields to return, each a dot-path from the allowlist. Omit to return all fields. Request only the fields your task needs to keep responses small.'
+ ),
+ })
+}
const advancedActivityLogsList = (): ToolBase<
- typeof AdvancedActivityLogsListSchema,
+ ReturnType<typeof AdvancedActivityLogsListSchema>,
WithPostHogUrl<Schemas.PaginatedActivityLogList>
> => ({
name: 'advanced-activity-logs-list',
- schema: AdvancedActivityLogsListSchema,
- handler: async (context: Context, params: z.infer<typeof AdvancedActivityLogsListSchema>) => {
+ schema: AdvancedActivityLogsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof AdvancedActivityLogsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedActivityLogList>({
method: 'GET',
@@ -153,12 +128,18 @@ const advancedActivityLogsList = (): ToolBase<
},
})
-const ApprovalPoliciesListSchema = ApprovalPoliciesListQueryParams
+const ApprovalPoliciesListSchema = () => {
+ const ApprovalPoliciesListQueryParams = orvalSchemas.ApprovalPoliciesListQueryParams()
+ return ApprovalPoliciesListQueryParams
+}
-const approvalPoliciesList = (): ToolBase<typeof ApprovalPoliciesListSchema, Schemas.PaginatedApprovalPolicyList> => ({
+const approvalPoliciesList = (): ToolBase<
+ ReturnType<typeof ApprovalPoliciesListSchema>,
+ Schemas.PaginatedApprovalPolicyList
+> => ({
name: 'approval-policies-list',
- schema: ApprovalPoliciesListSchema,
- handler: async (context: Context, params: z.infer<typeof ApprovalPoliciesListSchema>) => {
+ schema: ApprovalPoliciesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ApprovalPoliciesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedApprovalPolicyList>({
method: 'GET',
@@ -172,12 +153,15 @@ const approvalPoliciesList = (): ToolBase<typeof ApprovalPoliciesListSchema, Sch
},
})
-const ApprovalPolicyGetSchema = ApprovalPoliciesRetrieveParams.omit({ project_id: true })
+const ApprovalPolicyGetSchema = () => {
+ const ApprovalPoliciesRetrieveParams = orvalSchemas.ApprovalPoliciesRetrieveParams()
+ return ApprovalPoliciesRetrieveParams.omit({ project_id: true })
+}
-const approvalPolicyGet = (): ToolBase<typeof ApprovalPolicyGetSchema, Schemas.ApprovalPolicy> => ({
+const approvalPolicyGet = (): ToolBase<ReturnType<typeof ApprovalPolicyGetSchema>, Schemas.ApprovalPolicy> => ({
name: 'approval-policy-get',
- schema: ApprovalPolicyGetSchema,
- handler: async (context: Context, params: z.infer<typeof ApprovalPolicyGetSchema>) => {
+ schema: ApprovalPolicyGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ApprovalPolicyGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ApprovalPolicy>({
method: 'GET',
@@ -187,15 +171,18 @@ const approvalPolicyGet = (): ToolBase<typeof ApprovalPolicyGetSchema, Schemas.A
},
})
-const ChangeRequestGetSchema = ChangeRequestsRetrieveParams.omit({ project_id: true })
+const ChangeRequestGetSchema = () => {
+ const ChangeRequestsRetrieveParams = orvalSchemas.ChangeRequestsRetrieveParams()
+ return ChangeRequestsRetrieveParams.omit({ project_id: true })
+}
const changeRequestGet = (): ToolBase<
- typeof ChangeRequestGetSchema,
+ ReturnType<typeof ChangeRequestGetSchema>,
WithInformationalResponse<Schemas.ChangeRequest>
> => ({
name: 'change-request-get',
- schema: ChangeRequestGetSchema,
- handler: async (context: Context, params: z.infer<typeof ChangeRequestGetSchema>) => {
+ schema: ChangeRequestGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ChangeRequestGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ChangeRequest>({
method: 'GET',
@@ -209,13 +196,17 @@ const changeRequestGet = (): ToolBase<
},
})
-const ChangeRequestsApproveSchema = ChangeRequestsApproveCreateParams.omit({ project_id: true })
- .extend(ChangeRequestsApproveCreateBody.shape)
- .extend({
- reason: ChangeRequestsApproveCreateBody.shape['reason'].describe(
- 'Optional note recorded alongside your approval vote.'
- ),
- })
+const ChangeRequestsApproveSchema = () => {
+ const ChangeRequestsApproveCreateBody = orvalSchemas.ChangeRequestsApproveCreateBody()
+ const ChangeRequestsApproveCreateParams = orvalSchemas.ChangeRequestsApproveCreateParams()
+ return ChangeRequestsApproveCreateParams.omit({ project_id: true })
+ .extend(ChangeRequestsApproveCreateBody.shape)
+ .extend({
+ reason: ChangeRequestsApproveCreateBody.shape['reason'].describe(
+ 'Optional note recorded alongside your approval vote.'
+ ),
+ })
+}
const ChangeRequestsApproveSchemaExecute = z.strictObject({
confirmation_hash: z
@@ -225,12 +216,12 @@ const ChangeRequestsApproveSchemaExecute = z.strictObject({
})
const changeRequestsApprovePrepare = (): ToolBase<
- typeof ChangeRequestsApproveSchema,
+ ReturnType<typeof ChangeRequestsApproveSchema>,
PrepareConfirmedActionResult
> => ({
name: 'change-requests-approve-prepare',
- schema: ChangeRequestsApproveSchema,
- handler: async (context: Context, params: z.infer<typeof ChangeRequestsApproveSchema>) => {
+ schema: ChangeRequestsApproveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ChangeRequestsApproveSchema>>) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
return await prepareConfirmedAction(context, {
@@ -255,7 +246,7 @@ const changeRequestsApproveExecute = (): ToolBase<
handler: async (context: Context, confirmationParams: z.infer<typeof ChangeRequestsApproveSchemaExecute>) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
- const __guard = await executeConfirmedAction<z.infer<typeof ChangeRequestsApproveSchema>>(context, {
+ const __guard = await executeConfirmedAction<z.infer<ReturnType<typeof ChangeRequestsApproveSchema>>>(context, {
incomingArgs: confirmationParams,
purpose: 'change-requests-approve',
codec: __runtime.codec,
@@ -293,19 +284,22 @@ const changeRequestsApproveExecute = (): ToolBase<
},
})
-const ChangeRequestsListSchema = ChangeRequestsListQueryParams.extend({
- state: ChangeRequestsListQueryParams.shape['state'].describe(
- 'Optional comma-separated filter by state. Use `pending` to see only requests still open for a decision. Values: pending, approved, applied, rejected, expired.'
- ),
-})
+const ChangeRequestsListSchema = () => {
+ const ChangeRequestsListQueryParams = orvalSchemas.ChangeRequestsListQueryParams()
+ return ChangeRequestsListQueryParams.extend({
+ state: ChangeRequestsListQueryParams.shape['state'].describe(
+ 'Optional comma-separated filter by state. Use `pending` to see only requests still open for a decision. Values: pending, approved, applied, rejected, expired.'
+ ),
+ })
+}
const changeRequestsList = (): ToolBase<
- typeof ChangeRequestsListSchema,
+ ReturnType<typeof ChangeRequestsListSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.PaginatedChangeRequestList>>
> => ({
name: 'change-requests-list',
- schema: ChangeRequestsListSchema,
- handler: async (context: Context, params: z.infer<typeof ChangeRequestsListSchema>) => {
+ schema: ChangeRequestsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ChangeRequestsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedChangeRequestList>({
method: 'GET',
@@ -347,13 +341,17 @@ const changeRequestsList = (): ToolBase<
},
})
-const ChangeRequestsRejectSchema = ChangeRequestsRejectCreateParams.omit({ project_id: true })
- .extend(ChangeRequestsRejectCreateBody.shape)
- .extend({
- reason: ChangeRequestsRejectCreateBody.shape['reason'].describe(
- 'Reason for the rejection (required). Recorded with the vote and shown to the requester.'
- ),
- })
+const ChangeRequestsRejectSchema = () => {
+ const ChangeRequestsRejectCreateBody = orvalSchemas.ChangeRequestsRejectCreateBody()
+ const ChangeRequestsRejectCreateParams = orvalSchemas.ChangeRequestsRejectCreateParams()
+ return ChangeRequestsRejectCreateParams.omit({ project_id: true })
+ .extend(ChangeRequestsRejectCreateBody.shape)
+ .extend({
+ reason: ChangeRequestsRejectCreateBody.shape['reason'].describe(
+ 'Reason for the rejection (required). Recorded with the vote and shown to the requester.'
+ ),
+ })
+}
const ChangeRequestsRejectSchemaExecute = z.strictObject({
confirmation_hash: z
@@ -362,10 +360,13 @@ const ChangeRequestsRejectSchemaExecute = z.strictObject({
confirmation: z.string().describe('The literal string "confirm", typed by the user in chat. Required to proceed.'),
})
-const changeRequestsRejectPrepare = (): ToolBase<typeof ChangeRequestsRejectSchema, PrepareConfirmedActionResult> => ({
+const changeRequestsRejectPrepare = (): ToolBase<
+ ReturnType<typeof ChangeRequestsRejectSchema>,
+ PrepareConfirmedActionResult
+> => ({
name: 'change-requests-reject-prepare',
- schema: ChangeRequestsRejectSchema,
- handler: async (context: Context, params: z.infer<typeof ChangeRequestsRejectSchema>) => {
+ schema: ChangeRequestsRejectSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ChangeRequestsRejectSchema>>) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
return await prepareConfirmedAction(context, {
@@ -390,7 +391,7 @@ const changeRequestsRejectExecute = (): ToolBase<
handler: async (context: Context, confirmationParams: z.infer<typeof ChangeRequestsRejectSchemaExecute>) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
- const __guard = await executeConfirmedAction<z.infer<typeof ChangeRequestsRejectSchema>>(context, {
+ const __guard = await executeConfirmedAction<z.infer<ReturnType<typeof ChangeRequestsRejectSchema>>>(context, {
incomingArgs: confirmationParams,
purpose: 'change-requests-reject',
codec: __runtime.codec,
@@ -427,13 +428,12 @@ const changeRequestsRejectExecute = (): ToolBase<
},
})
-const CommentCountSchema = z.object({})
+const CommentCountSchema = () => z.object({})
-const commentCount = (): ToolBase<typeof CommentCountSchema, unknown> => ({
+const commentCount = (): ToolBase<ReturnType<typeof CommentCountSchema>, unknown> => ({
name: 'comment-count',
- schema: CommentCountSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof CommentCountSchema>) => {
+ schema: CommentCountSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof CommentCountSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'GET',
@@ -443,12 +443,15 @@ const commentCount = (): ToolBase<typeof CommentCountSchema, unknown> => ({
},
})
-const CommentGetSchema = CommentsRetrieveParams.omit({ project_id: true })
+const CommentGetSchema = () => {
+ const CommentsRetrieveParams = orvalSchemas.CommentsRetrieveParams()
+ return CommentsRetrieveParams.omit({ project_id: true })
+}
-const commentGet = (): ToolBase<typeof CommentGetSchema, Schemas.Comment> => ({
+const commentGet = (): ToolBase<ReturnType<typeof CommentGetSchema>, Schemas.Comment> => ({
name: 'comment-get',
- schema: CommentGetSchema,
- handler: async (context: Context, params: z.infer<typeof CommentGetSchema>) => {
+ schema: CommentGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CommentGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Comment>({
method: 'GET',
@@ -458,12 +461,15 @@ const commentGet = (): ToolBase<typeof CommentGetSchema, Schemas.Comment> => ({
},
})
-const CommentThreadSchema = CommentsThreadRetrieveParams.omit({ project_id: true })
+const CommentThreadSchema = () => {
+ const CommentsThreadRetrieveParams = orvalSchemas.CommentsThreadRetrieveParams()
+ return CommentsThreadRetrieveParams.omit({ project_id: true })
+}
-const commentThread = (): ToolBase<typeof CommentThreadSchema, unknown> => ({
+const commentThread = (): ToolBase<ReturnType<typeof CommentThreadSchema>, unknown> => ({
name: 'comment-thread',
- schema: CommentThreadSchema,
- handler: async (context: Context, params: z.infer<typeof CommentThreadSchema>) => {
+ schema: CommentThreadSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CommentThreadSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'GET',
@@ -473,12 +479,15 @@ const commentThread = (): ToolBase<typeof CommentThreadSchema, unknown> => ({
},
})
-const CommentsCreateSchema = CommentsCreateBody
+const CommentsCreateSchema = () => {
+ const CommentsCreateBody = orvalSchemas.CommentsCreateBody()
+ return CommentsCreateBody
+}
-const commentsCreate = (): ToolBase<typeof CommentsCreateSchema, Schemas.Comment> => ({
+const commentsCreate = (): ToolBase<ReturnType<typeof CommentsCreateSchema>, Schemas.Comment> => ({
name: 'comments-create',
- schema: CommentsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof CommentsCreateSchema>) => {
+ schema: CommentsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CommentsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.scope !== undefined) {
@@ -520,12 +529,15 @@ const commentsCreate = (): ToolBase<typeof CommentsCreateSchema, Schemas.Comment
},
})
-const CommentsListSchema = CommentsListQueryParams
+const CommentsListSchema = () => {
+ const CommentsListQueryParams = orvalSchemas.CommentsListQueryParams()
+ return CommentsListQueryParams
+}
-const commentsList = (): ToolBase<typeof CommentsListSchema, Schemas.PaginatedCommentList> => ({
+const commentsList = (): ToolBase<ReturnType<typeof CommentsListSchema>, Schemas.PaginatedCommentList> => ({
name: 'comments-list',
- schema: CommentsListSchema,
- handler: async (context: Context, params: z.infer<typeof CommentsListSchema>) => {
+ schema: CommentsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof CommentsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedCommentList>({
method: 'GET',
@@ -545,19 +557,22 @@ const commentsList = (): ToolBase<typeof CommentsListSchema, Schemas.PaginatedCo
},
})
-const OrgMemberGetGithubLoginSchema = MembersGithubLoginRetrieveParams.omit({ organization_id: true }).extend({
- user__uuid: MembersGithubLoginRetrieveParams.shape['user__uuid'].describe(
- 'The PostHog user UUID of the organization member, as returned by org-members-list. Pass "@me" for the current user.'
- ),
-})
+const OrgMemberGetGithubLoginSchema = () => {
+ const MembersGithubLoginRetrieveParams = orvalSchemas.MembersGithubLoginRetrieveParams()
+ return MembersGithubLoginRetrieveParams.omit({ organization_id: true }).extend({
+ user__uuid: MembersGithubLoginRetrieveParams.shape['user__uuid'].describe(
+ 'The PostHog user UUID of the organization member, as returned by org-members-list. Pass "@me" for the current user.'
+ ),
+ })
+}
const orgMemberGetGithubLogin = (): ToolBase<
- typeof OrgMemberGetGithubLoginSchema,
+ ReturnType<typeof OrgMemberGetGithubLoginSchema>,
Schemas.OrganizationMemberGithubLogin
> => ({
name: 'org-member-get-github-login',
- schema: OrgMemberGetGithubLoginSchema,
- handler: async (context: Context, params: z.infer<typeof OrgMemberGetGithubLoginSchema>) => {
+ schema: OrgMemberGetGithubLoginSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof OrgMemberGetGithubLoginSchema>>) => {
const orgId = await context.stateManager.getOrgID()
const result = await context.api.request<Schemas.OrganizationMemberGithubLogin>({
method: 'GET',
@@ -567,12 +582,18 @@ const orgMemberGetGithubLogin = (): ToolBase<
},
})
-const OrgMembersListSchema = MembersListQueryParams
+const OrgMembersListSchema = () => {
+ const MembersListQueryParams = orvalSchemas.MembersListQueryParams()
+ return MembersListQueryParams
+}
-const orgMembersList = (): ToolBase<typeof OrgMembersListSchema, Schemas.PaginatedOrganizationMemberList> => ({
+const orgMembersList = (): ToolBase<
+ ReturnType<typeof OrgMembersListSchema>,
+ Schemas.PaginatedOrganizationMemberList
+> => ({
name: 'org-members-list',
- schema: OrgMembersListSchema,
- handler: async (context: Context, params: z.infer<typeof OrgMembersListSchema>) => {
+ schema: OrgMembersListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof OrgMembersListSchema>>) => {
const orgId = await context.stateManager.getOrgID()
const result = await context.api.request<Schemas.PaginatedOrganizationMemberList>({
method: 'GET',
@@ -591,33 +612,37 @@ const orgMembersList = (): ToolBase<typeof OrgMembersListSchema, Schemas.Paginat
},
})
-const OrganizationEnforce2faSchema = PartialUpdateParams.extend(
- PartialUpdateBody.omit({
- name: true,
- logo_media_id: true,
- enforce_verified_domains: true,
- members_can_invite: true,
- members_can_create_projects: true,
- members_can_use_personal_api_keys: true,
- members_can_see_org_members: true,
- allow_publicly_shared_resources: true,
- read_only_mcp_access: true,
- is_ai_data_processing_approved: true,
- is_ai_training_opted_in: true,
- default_experiment_stats_method: true,
- default_anonymize_ips: true,
- default_role_id: true,
- }).shape
-).extend({
- id: PartialUpdateParams.shape['id']
- .describe('Organization ID. If omitted, targets the active organization.')
- .optional(),
- enforce_2fa: PartialUpdateBody.shape['enforce_2fa']
- .unwrap()
- .describe(
- 'Set to true to require every organization member to have 2FA enabled; false to lift the requirement. Applies org-wide and takes effect immediately.'
- ),
-})
+const OrganizationEnforce2faSchema = () => {
+ const PartialUpdateBody = orvalSchemas.PartialUpdateBody()
+ const PartialUpdateParams = orvalSchemas.PartialUpdateParams()
+ return PartialUpdateParams.extend(
+ PartialUpdateBody.omit({
+ name: true,
+ logo_media_id: true,
+ enforce_verified_domains: true,
+ members_can_invite: true,
+ members_can_create_projects: true,
+ members_can_use_personal_api_keys: true,
+ members_can_see_org_members: true,
+ allow_publicly_shared_resources: true,
+ read_only_mcp_access: true,
+ is_ai_data_processing_approved: true,
+ is_ai_training_opted_in: true,
+ default_experiment_stats_method: true,
+ default_anonymize_ips: true,
+ default_role_id: true,
+ }).shape
+ ).extend({
+ id: PartialUpdateParams.shape['id']
+ .describe('Organization ID. If omitted, targets the active organization.')
+ .optional(),
+ enforce_2fa: PartialUpdateBody.shape['enforce_2fa']
+ .unwrap()
+ .describe(
+ 'Set to true to require every organization member to have 2FA enabled; false to lift the requirement. Applies org-wide and takes effect immediately.'
+ ),
+ })
+}
const OrganizationEnforce2faSchemaExecute = z.strictObject({
confirmation_hash: z
@@ -627,12 +652,12 @@ const OrganizationEnforce2faSchemaExecute = z.strictObject({
})
const organizationEnforce2faPrepare = (): ToolBase<
- typeof OrganizationEnforce2faSchema,
+ ReturnType<typeof OrganizationEnforce2faSchema>,
PrepareConfirmedActionResult
> => ({
name: 'organization-enforce-2fa-prepare',
- schema: OrganizationEnforce2faSchema,
- handler: async (context: Context, params: z.infer<typeof OrganizationEnforce2faSchema>) => {
+ schema: OrganizationEnforce2faSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof OrganizationEnforce2faSchema>>) => {
const __runtime = getConfirmedActionRuntime()
const id = params.id ?? (await context.stateManager.getOrgID())
if (!id) {
@@ -658,13 +683,16 @@ const organizationEnforce2faExecute = (): ToolBase<
schema: OrganizationEnforce2faSchemaExecute,
handler: async (context: Context, confirmationParams: z.infer<typeof OrganizationEnforce2faSchemaExecute>) => {
const __runtime = getConfirmedActionRuntime()
- const __guard = await executeConfirmedAction<z.infer<typeof OrganizationEnforce2faSchema>>(context, {
- incomingArgs: confirmationParams,
- purpose: 'organization-enforce-2fa',
- codec: __runtime.codec,
- ledger: __runtime.ledger,
- stash: __runtime.stash,
- })
+ const __guard = await executeConfirmedAction<z.infer<ReturnType<typeof OrganizationEnforce2faSchema>>>(
+ context,
+ {
+ incomingArgs: confirmationParams,
+ purpose: 'organization-enforce-2fa',
+ codec: __runtime.codec,
+ ledger: __runtime.ledger,
+ stash: __runtime.stash,
+ }
+ )
if (!__guard.ok) {
return __guard.result as never
}
@@ -687,14 +715,19 @@ const organizationEnforce2faExecute = (): ToolBase<
},
})
-const OrganizationGetSchema = RetrieveParams.extend({
- id: RetrieveParams.shape['id'].describe('Organization ID. If omitted, uses the active organization.').optional(),
-})
+const OrganizationGetSchema = () => {
+ const RetrieveParams = orvalSchemas.RetrieveParams()
+ return RetrieveParams.extend({
+ id: RetrieveParams.shape['id']
+ .describe('Organization ID. If omitted, uses the active organization.')
+ .optional(),
+ })
+}
-const organizationGet = (): ToolBase<typeof OrganizationGetSchema, Schemas.Organization> => ({
+const organizationGet = (): ToolBase<ReturnType<typeof OrganizationGetSchema>, Schemas.Organization> => ({
name: 'organization-get',
- schema: OrganizationGetSchema,
- handler: async (context: Context, params: z.infer<typeof OrganizationGetSchema>) => {
+ schema: OrganizationGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof OrganizationGetSchema>>) => {
const id = params.id ?? (await context.stateManager.getOrgID())
if (!id) {
throw new Error('id is required. Provide it explicitly or set an active organization first.')
@@ -721,15 +754,18 @@ const organizationGet = (): ToolBase<typeof OrganizationGetSchema, Schemas.Organ
},
})
-const OrganizationsListSchema = ListQueryParams
+const OrganizationsListSchema = () => {
+ const ListQueryParams = orvalSchemas.ListQueryParams()
+ return ListQueryParams
+}
const organizationsList = (): ToolBase<
- typeof OrganizationsListSchema,
+ ReturnType<typeof OrganizationsListSchema>,
WithPostHogUrl<Schemas.PaginatedOrganizationList>
> => ({
name: 'organizations-list',
- schema: OrganizationsListSchema,
- handler: async (context: Context, params: z.infer<typeof OrganizationsListSchema>) => {
+ schema: OrganizationsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof OrganizationsListSchema>>) => {
const result = await context.api.request<Schemas.PaginatedOrganizationList>({
method: 'GET',
path: `/api/organizations/`,
@@ -748,12 +784,15 @@ const organizationsList = (): ToolBase<
},
})
-const RoleGetSchema = RolesRetrieveParams.omit({ organization_id: true })
+const RoleGetSchema = () => {
+ const RolesRetrieveParams = orvalSchemas.RolesRetrieveParams()
+ return RolesRetrieveParams.omit({ organization_id: true })
+}
-const roleGet = (): ToolBase<typeof RoleGetSchema, Schemas.Role> => ({
+const roleGet = (): ToolBase<ReturnType<typeof RoleGetSchema>, Schemas.Role> => ({
name: 'role-get',
- schema: RoleGetSchema,
- handler: async (context: Context, params: z.infer<typeof RoleGetSchema>) => {
+ schema: RoleGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof RoleGetSchema>>) => {
const orgId = await context.stateManager.getOrgID()
const result = await context.api.request<Schemas.Role>({
method: 'GET',
@@ -763,14 +802,21 @@ const roleGet = (): ToolBase<typeof RoleGetSchema, Schemas.Role> => ({
},
})
-const RoleMembersListSchema = RolesRoleMembershipsListParams.omit({ organization_id: true }).extend(
- RolesRoleMembershipsListQueryParams.shape
-)
+const RoleMembersListSchema = () => {
+ const RolesRoleMembershipsListParams = orvalSchemas.RolesRoleMembershipsListParams()
+ const RolesRoleMembershipsListQueryParams = orvalSchemas.RolesRoleMembershipsListQueryParams()
+ return RolesRoleMembershipsListParams.omit({ organization_id: true }).extend(
+ RolesRoleMembershipsListQueryParams.shape
+ )
+}
-const roleMembersList = (): ToolBase<typeof RoleMembersListSchema, Schemas.PaginatedRoleMembershipList> => ({
+const roleMembersList = (): ToolBase<
+ ReturnType<typeof RoleMembersListSchema>,
+ Schemas.PaginatedRoleMembershipList
+> => ({
name: 'role-members-list',
- schema: RoleMembersListSchema,
- handler: async (context: Context, params: z.infer<typeof RoleMembersListSchema>) => {
+ schema: RoleMembersListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof RoleMembersListSchema>>) => {
const orgId = await context.stateManager.getOrgID()
const result = await context.api.request<Schemas.PaginatedRoleMembershipList>({
method: 'GET',
@@ -784,12 +830,15 @@ const roleMembersList = (): ToolBase<typeof RoleMembersListSchema, Schemas.Pagin
},
})
-const RolesListSchema = RolesListQueryParams
+const RolesListSchema = () => {
+ const RolesListQueryParams = orvalSchemas.RolesListQueryParams()
+ return RolesListQueryParams
+}
-const rolesList = (): ToolBase<typeof RolesListSchema, Schemas.PaginatedRoleList> => ({
+const rolesList = (): ToolBase<ReturnType<typeof RolesListSchema>, Schemas.PaginatedRoleList> => ({
name: 'roles-list',
- schema: RolesListSchema,
- handler: async (context: Context, params: z.infer<typeof RolesListSchema>) => {
+ schema: RolesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof RolesListSchema>>) => {
const orgId = await context.stateManager.getOrgID()
const result = await context.api.request<Schemas.PaginatedRoleList>({
method: 'GET',
@@ -803,16 +852,19 @@ const rolesList = (): ToolBase<typeof RolesListSchema, Schemas.PaginatedRoleList
},
})
-const UserHomeSettingsGetSchema = UserHomeSettingsRetrieveParams.extend({
- uuid: UserHomeSettingsRetrieveParams.shape['uuid'].describe(
- 'User UUID, or `@me` to target the authenticated user.'
- ),
-})
+const UserHomeSettingsGetSchema = () => {
+ const UserHomeSettingsRetrieveParams = orvalSchemas.UserHomeSettingsRetrieveParams()
+ return UserHomeSettingsRetrieveParams.extend({
+ uuid: UserHomeSettingsRetrieveParams.shape['uuid'].describe(
+ 'User UUID, or `@me` to target the authenticated user.'
+ ),
+ })
+}
-const userHomeSettingsGet = (): ToolBase<typeof UserHomeSettingsGetSchema, Schemas.PinnedSceneTabs> => ({
+const userHomeSettingsGet = (): ToolBase<ReturnType<typeof UserHomeSettingsGetSchema>, Schemas.PinnedSceneTabs> => ({
name: 'user-home-settings-get',
- schema: UserHomeSettingsGetSchema,
- handler: async (context: Context, params: z.infer<typeof UserHomeSettingsGetSchema>) => {
+ schema: UserHomeSettingsGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UserHomeSettingsGetSchema>>) => {
const result = await context.api.request<Schemas.PinnedSceneTabs>({
method: 'GET',
path: `/api/user_home_settings/${encodeURIComponent(String(params.uuid))}/`,
@@ -821,18 +873,23 @@ const userHomeSettingsGet = (): ToolBase<typeof UserHomeSettingsGetSchema, Schem
},
})
-const UserHomeSettingsUpdateSchema = UserHomeSettingsPartialUpdateParams.extend(
- UserHomeSettingsPartialUpdateBody.shape
-).extend({
- uuid: UserHomeSettingsPartialUpdateParams.shape['uuid'].describe(
- 'User UUID, or `@me` to target the authenticated user.'
- ),
-})
+const UserHomeSettingsUpdateSchema = () => {
+ const UserHomeSettingsPartialUpdateBody = orvalSchemas.UserHomeSettingsPartialUpdateBody()
+ const UserHomeSettingsPartialUpdateParams = orvalSchemas.UserHomeSettingsPartialUpdateParams()
+ return UserHomeSettingsPartialUpdateParams.extend(UserHomeSettingsPartialUpdateBody.shape).extend({
+ uuid: UserHomeSettingsPartialUpdateParams.shape['uuid'].describe(
+ 'User UUID, or `@me` to target the authenticated user.'
+ ),
+ })
+}
-const userHomeSettingsUpdate = (): ToolBase<typeof UserHomeSettingsUpdateSchema, Schemas.PinnedSceneTabs> => ({
+const userHomeSettingsUpdate = (): ToolBase<
+ ReturnType<typeof UserHomeSettingsUpdateSchema>,
+ Schemas.PinnedSceneTabs
+> => ({
name: 'user-home-settings-update',
- schema: UserHomeSettingsUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof UserHomeSettingsUpdateSchema>) => {
+ schema: UserHomeSettingsUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UserHomeSettingsUpdateSchema>>) => {
const body: Record<string, unknown> = {}
if (params.tabs !== undefined) {
body['tabs'] = params.tabs
diff --git a/services/mcp/src/tools/generated/posthog_ai.ts b/services/mcp/src/tools/generated/posthog_ai.ts
index 6c64379100ea..018ec7465259 100644
--- a/services/mcp/src/tools/generated/posthog_ai.ts
+++ b/services/mcp/src/tools/generated/posthog_ai.ts
@@ -2,7 +2,7 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import { ConversationsListQueryParams, ConversationsRetrieveParams } from '@/generated/posthog_ai/api'
+import * as orvalSchemas from '@/generated/posthog_ai/api'
import {
withPostHogUrl,
pickResponseFields,
@@ -12,15 +12,18 @@ import {
} from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const ConversationsListSchema = ConversationsListQueryParams
+const ConversationsListSchema = () => {
+ const ConversationsListQueryParams = orvalSchemas.ConversationsListQueryParams()
+ return ConversationsListQueryParams
+}
const conversationsList = (): ToolBase<
- typeof ConversationsListSchema,
+ ReturnType<typeof ConversationsListSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.PaginatedConversationMinimalList>>
> => ({
name: 'conversations-list',
- schema: ConversationsListSchema,
- handler: async (context: Context, params: z.infer<typeof ConversationsListSchema>) => {
+ schema: ConversationsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ConversationsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedConversationMinimalList>({
method: 'GET',
@@ -53,15 +56,18 @@ const conversationsList = (): ToolBase<
},
})
-const ConversationsRetrieveSchema = ConversationsRetrieveParams.omit({ project_id: true })
+const ConversationsRetrieveSchema = () => {
+ const ConversationsRetrieveParams = orvalSchemas.ConversationsRetrieveParams()
+ return ConversationsRetrieveParams.omit({ project_id: true })
+}
const conversationsRetrieve = (): ToolBase<
- typeof ConversationsRetrieveSchema,
+ ReturnType<typeof ConversationsRetrieveSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.Conversation>>
> => ({
name: 'conversations-retrieve',
- schema: ConversationsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ConversationsRetrieveSchema>) => {
+ schema: ConversationsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ConversationsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Conversation>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/product_analytics.ts b/services/mcp/src/tools/generated/product_analytics.ts
index d9a611e074e6..e59bdead252e 100644
--- a/services/mcp/src/tools/generated/product_analytics.ts
+++ b/services/mcp/src/tools/generated/product_analytics.ts
@@ -2,20 +2,7 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- ElementsStatsRetrieveQueryParams,
- InsightsActivityRetrieveParams,
- InsightsActivityRetrieveQueryParams,
- InsightsAllActivityRetrieveQueryParams,
- InsightsCreateBody,
- InsightsDestroyParams,
- InsightsListQueryParams,
- InsightsPartialUpdateBody,
- InsightsPartialUpdateParams,
- InsightsRetrieveParams,
- InsightsRetrieveQueryParams,
- InsightsTrendingRetrieveQueryParams,
-} from '@/generated/product_analytics/api'
+import * as orvalSchemas from '@/generated/product_analytics/api'
import { castStringToInt, normalizeParamAliases } from '@/tools/cast-helpers'
import {
withPostHogUrl,
@@ -210,12 +197,18 @@ const AssistantDataVisualizationNode = z.object({
const InsightQuery = z.union([AssistantInsightVizNode, AssistantDataVisualizationNode])
-const ElementsStatsRetrieveSchema = ElementsStatsRetrieveQueryParams
+const ElementsStatsRetrieveSchema = () => {
+ const ElementsStatsRetrieveQueryParams = orvalSchemas.ElementsStatsRetrieveQueryParams()
+ return ElementsStatsRetrieveQueryParams
+}
-const elementsStatsRetrieve = (): ToolBase<typeof ElementsStatsRetrieveSchema, Schemas.ElementStatsResponse> => ({
+const elementsStatsRetrieve = (): ToolBase<
+ ReturnType<typeof ElementsStatsRetrieveSchema>,
+ Schemas.ElementStatsResponse
+> => ({
name: 'elements-stats-retrieve',
- schema: ElementsStatsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ElementsStatsRetrieveSchema>) => {
+ schema: ElementsStatsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ElementsStatsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ElementStatsResponse>({
method: 'GET',
@@ -236,25 +229,23 @@ const elementsStatsRetrieve = (): ToolBase<typeof ElementsStatsRetrieveSchema, S
},
})
-const InsightCreateSchema = InsightsCreateBody.omit({
- derived_name: true,
- order: true,
- deleted: true,
- _create_in_folder: true,
-}).extend({
- query: InsightQuery,
- dashboards: InsightsCreateBody.shape['dashboards'].describe(
- 'Dashboard IDs this insight should belong to. This is a full replacement — always include all existing dashboard IDs when adding a new one.'
- ),
- description: InsightsCreateBody.shape['description'].describe(
- 'Human-readable summary of what the insight shows. Max 400 characters (longer values are rejected).'
- ),
-})
+const InsightCreateSchema = () => {
+ const InsightsCreateBody = orvalSchemas.InsightsCreateBody()
+ return InsightsCreateBody.omit({ derived_name: true, order: true, deleted: true, _create_in_folder: true }).extend({
+ query: InsightQuery,
+ dashboards: InsightsCreateBody.shape['dashboards'].describe(
+ 'Dashboard IDs this insight should belong to. This is a full replacement — always include all existing dashboard IDs when adding a new one.'
+ ),
+ description: InsightsCreateBody.shape['description'].describe(
+ 'Human-readable summary of what the insight shows. Max 400 characters (longer values are rejected).'
+ ),
+ })
+}
-const insightCreate = (): ToolBase<typeof InsightCreateSchema, WithPostHogUrl<Schemas.Insight>> => ({
+const insightCreate = (): ToolBase<ReturnType<typeof InsightCreateSchema>, WithPostHogUrl<Schemas.Insight>> => ({
name: 'insight-create',
- schema: InsightCreateSchema,
- handler: async (context: Context, params: z.infer<typeof InsightCreateSchema>) => {
+ schema: InsightCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InsightCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -293,15 +284,18 @@ const insightCreate = (): ToolBase<typeof InsightCreateSchema, WithPostHogUrl<Sc
},
})
-const InsightDeleteSchema = z.preprocess(
- normalizeParamAliases({ id: ['insightId', 'insight_id', 'short_id', 'shortId'] }),
- InsightsDestroyParams.omit({ project_id: true })
-)
+const InsightDeleteSchema = () => {
+ const InsightsDestroyParams = orvalSchemas.InsightsDestroyParams()
+ return z.preprocess(
+ normalizeParamAliases({ id: ['insightId', 'insight_id', 'short_id', 'shortId'] }),
+ InsightsDestroyParams.omit({ project_id: true })
+ )
+}
-const insightDelete = (): ToolBase<typeof InsightDeleteSchema, Schemas.Insight> => ({
+const insightDelete = (): ToolBase<ReturnType<typeof InsightDeleteSchema>, Schemas.Insight> => ({
name: 'insight-delete',
- schema: InsightDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof InsightDeleteSchema>) => {
+ schema: InsightDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InsightDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Insight>({
method: 'PATCH',
@@ -312,30 +306,34 @@ const insightDelete = (): ToolBase<typeof InsightDeleteSchema, Schemas.Insight>
},
})
-const InsightGetSchema = z.preprocess(
- normalizeParamAliases({ id: ['insightId', 'insight_id', 'short_id', 'shortId'] }),
- InsightsRetrieveParams.omit({ project_id: true })
- .extend(InsightsRetrieveQueryParams.omit({ format: true, from_dashboard: true, refresh: true }).shape)
- .extend({
- filters_override: z
- .union([z.string(), z.record(z.string(), z.unknown())])
- .optional()
- .describe(
- "Object (or pre-encoded JSON string) to override the insight's filters for this request only (not persisted). Top-level keys replace; nested values are not deep-merged — pass the complete value for any key you override. Accepts the same keys as the dashboard filters schema (e.g., `date_from`, `date_to`, `properties`). Ignored when accessed via a sharing token."
- ),
- variables_override: z
- .union([z.string(), z.record(z.string(), z.unknown())])
- .optional()
- .describe(
- 'Object (or pre-encoded JSON string) to override the insight\'s HogQL variables for this request only (not persisted). Format: {"<variable_id>": {"code_name": "<code_name>", "variableId": "<variable_id>", "value": <new_value>}}. Each entry must include `code_name` — partial entries are silently dropped. The simplest workflow is to call `insight-get` first, copy the matching entry from the response, and mutate `value`. Top-level keys replace; nested values are not deep-merged. Ignored when accessed via a sharing token.'
- ),
- })
-)
+const InsightGetSchema = () => {
+ const InsightsRetrieveParams = orvalSchemas.InsightsRetrieveParams()
+ const InsightsRetrieveQueryParams = orvalSchemas.InsightsRetrieveQueryParams()
+ return z.preprocess(
+ normalizeParamAliases({ id: ['insightId', 'insight_id', 'short_id', 'shortId'] }),
+ InsightsRetrieveParams.omit({ project_id: true })
+ .extend(InsightsRetrieveQueryParams.omit({ format: true, from_dashboard: true, refresh: true }).shape)
+ .extend({
+ filters_override: z
+ .union([z.string(), z.record(z.string(), z.unknown())])
+ .optional()
+ .describe(
+ "Object (or pre-encoded JSON string) to override the insight's filters for this request only (not persisted). Top-level keys replace; nested values are not deep-merged — pass the complete value for any key you override. Accepts the same keys as the dashboard filters schema (e.g., `date_from`, `date_to`, `properties`). Ignored when accessed via a sharing token."
+ ),
+ variables_override: z
+ .union([z.string(), z.record(z.string(), z.unknown())])
+ .optional()
+ .describe(
+ 'Object (or pre-encoded JSON string) to override the insight\'s HogQL variables for this request only (not persisted). Format: {"<variable_id>": {"code_name": "<code_name>", "variableId": "<variable_id>", "value": <new_value>}}. Each entry must include `code_name` — partial entries are silently dropped. The simplest workflow is to call `insight-get` first, copy the matching entry from the response, and mutate `value`. Top-level keys replace; nested values are not deep-merged. Ignored when accessed via a sharing token.'
+ ),
+ })
+ )
+}
-const insightGet = (): ToolBase<typeof InsightGetSchema, WithPostHogUrl<Schemas.Insight>> => ({
+const insightGet = (): ToolBase<ReturnType<typeof InsightGetSchema>, WithPostHogUrl<Schemas.Insight>> => ({
name: 'insight-get',
- schema: InsightGetSchema,
- handler: async (context: Context, params: z.infer<typeof InsightGetSchema>) => {
+ schema: InsightGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InsightGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Insight>({
method: 'GET',
@@ -359,28 +357,39 @@ const insightGet = (): ToolBase<typeof InsightGetSchema, WithPostHogUrl<Schemas.
},
})
-const InsightUpdateSchema = z.preprocess(
- normalizeParamAliases({ id: ['insightId', 'insight_id', 'short_id', 'shortId'] }),
- InsightsPartialUpdateParams.omit({ project_id: true })
- .extend(
- InsightsPartialUpdateBody.omit({ derived_name: true, order: true, deleted: true, _create_in_folder: true })
- .shape
- )
- .extend({
- query: InsightQuery.optional(),
- dashboards: InsightsPartialUpdateBody.shape['dashboards'].describe(
- 'Dashboard IDs this insight should belong to. This is a full replacement — always include all existing dashboard IDs when adding a new one.'
- ),
- description: InsightsPartialUpdateBody.shape['description'].describe(
- 'Human-readable summary of what the insight shows. Max 400 characters (longer values are rejected).'
- ),
- })
-)
+const InsightUpdateSchema = () => {
+ const InsightsPartialUpdateBody = orvalSchemas.InsightsPartialUpdateBody()
+ const InsightsPartialUpdateParams = orvalSchemas.InsightsPartialUpdateParams()
+ return z.preprocess(
+ normalizeParamAliases({ id: ['insightId', 'insight_id', 'short_id', 'shortId'] }),
+ InsightsPartialUpdateParams.omit({ project_id: true })
+ .extend(
+ InsightsPartialUpdateBody.omit({
+ derived_name: true,
+ order: true,
+ deleted: true,
+ _create_in_folder: true,
+ }).shape
+ )
+ .extend({
+ query: InsightQuery.optional(),
+ dashboards: InsightsPartialUpdateBody.shape['dashboards'].describe(
+ 'Dashboard IDs this insight should belong to. This is a full replacement — always include all existing dashboard IDs when adding a new one.'
+ ),
+ description: InsightsPartialUpdateBody.shape['description'].describe(
+ 'Human-readable summary of what the insight shows. Max 400 characters (longer values are rejected).'
+ ),
+ })
+ )
+}
-const insightUpdate = (): ToolBase<typeof InsightUpdateSchema, WithAgentNote<WithPostHogUrl<Schemas.Insight>>> => ({
+const insightUpdate = (): ToolBase<
+ ReturnType<typeof InsightUpdateSchema>,
+ WithAgentNote<WithPostHogUrl<Schemas.Insight>>
+> => ({
name: 'insight-update',
- schema: InsightUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof InsightUpdateSchema>) => {
+ schema: InsightUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InsightUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -422,17 +431,21 @@ const insightUpdate = (): ToolBase<typeof InsightUpdateSchema, WithAgentNote<Wit
},
})
-const InsightsActivityRetrieveSchema = InsightsActivityRetrieveParams.omit({ project_id: true }).extend(
- InsightsActivityRetrieveQueryParams.omit({ format: true }).shape
-)
+const InsightsActivityRetrieveSchema = () => {
+ const InsightsActivityRetrieveParams = orvalSchemas.InsightsActivityRetrieveParams()
+ const InsightsActivityRetrieveQueryParams = orvalSchemas.InsightsActivityRetrieveQueryParams()
+ return InsightsActivityRetrieveParams.omit({ project_id: true }).extend(
+ InsightsActivityRetrieveQueryParams.omit({ format: true }).shape
+ )
+}
const insightsActivityRetrieve = (): ToolBase<
- typeof InsightsActivityRetrieveSchema,
+ ReturnType<typeof InsightsActivityRetrieveSchema>,
WithPostHogUrl<Schemas.ActivityLogPaginatedResponse>
> => ({
name: 'insights-activity-retrieve',
- schema: InsightsActivityRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof InsightsActivityRetrieveSchema>) => {
+ schema: InsightsActivityRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InsightsActivityRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ActivityLogPaginatedResponse>({
method: 'GET',
@@ -457,15 +470,18 @@ const insightsActivityRetrieve = (): ToolBase<
},
})
-const InsightsAllActivityRetrieveSchema = InsightsAllActivityRetrieveQueryParams.omit({ format: true })
+const InsightsAllActivityRetrieveSchema = () => {
+ const InsightsAllActivityRetrieveQueryParams = orvalSchemas.InsightsAllActivityRetrieveQueryParams()
+ return InsightsAllActivityRetrieveQueryParams.omit({ format: true })
+}
const insightsAllActivityRetrieve = (): ToolBase<
- typeof InsightsAllActivityRetrieveSchema,
+ ReturnType<typeof InsightsAllActivityRetrieveSchema>,
WithPostHogUrl<Schemas.ActivityLogPaginatedResponse>
> => ({
name: 'insights-all-activity-retrieve',
- schema: InsightsAllActivityRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof InsightsAllActivityRetrieveSchema>) => {
+ schema: InsightsAllActivityRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InsightsAllActivityRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ActivityLogPaginatedResponse>({
method: 'GET',
@@ -490,15 +506,21 @@ const insightsAllActivityRetrieve = (): ToolBase<
},
})
-const InsightsListSchema = InsightsListQueryParams.omit({ format: true, basic: true, refresh: true }).extend({
- limit: z.preprocess(castStringToInt, InsightsListQueryParams.shape['limit']).optional(),
- offset: z.preprocess(castStringToInt, InsightsListQueryParams.shape['offset']).optional(),
-})
+const InsightsListSchema = () => {
+ const InsightsListQueryParams = orvalSchemas.InsightsListQueryParams()
+ return InsightsListQueryParams.omit({ format: true, basic: true, refresh: true }).extend({
+ limit: z.preprocess(castStringToInt, InsightsListQueryParams.shape['limit']).optional(),
+ offset: z.preprocess(castStringToInt, InsightsListQueryParams.shape['offset']).optional(),
+ })
+}
-const insightsList = (): ToolBase<typeof InsightsListSchema, WithPostHogUrl<Schemas.PaginatedInsightList>> => ({
+const insightsList = (): ToolBase<
+ ReturnType<typeof InsightsListSchema>,
+ WithPostHogUrl<Schemas.PaginatedInsightList>
+> => ({
name: 'insights-list',
- schema: InsightsListSchema,
- handler: async (context: Context, params: z.infer<typeof InsightsListSchema>) => {
+ schema: InsightsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InsightsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedInsightList>({
method: 'GET',
@@ -558,15 +580,18 @@ const insightsList = (): ToolBase<typeof InsightsListSchema, WithPostHogUrl<Sche
},
})
-const InsightsTrendingRetrieveSchema = InsightsTrendingRetrieveQueryParams.omit({ format: true })
+const InsightsTrendingRetrieveSchema = () => {
+ const InsightsTrendingRetrieveQueryParams = orvalSchemas.InsightsTrendingRetrieveQueryParams()
+ return InsightsTrendingRetrieveQueryParams.omit({ format: true })
+}
const insightsTrendingRetrieve = (): ToolBase<
- typeof InsightsTrendingRetrieveSchema,
+ ReturnType<typeof InsightsTrendingRetrieveSchema>,
WithPostHogUrl<Schemas.PaginatedTrendingInsightList>
> => ({
name: 'insights-trending-retrieve',
- schema: InsightsTrendingRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof InsightsTrendingRetrieveSchema>) => {
+ schema: InsightsTrendingRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InsightsTrendingRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedTrendingInsightList>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/proxy-records.ts b/services/mcp/src/tools/generated/proxy-records.ts
index 7c181af452c3..8d5ae259cfcd 100644
--- a/services/mcp/src/tools/generated/proxy-records.ts
+++ b/services/mcp/src/tools/generated/proxy-records.ts
@@ -2,22 +2,19 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- ProxyRecordsCreateBody,
- ProxyRecordsDestroyParams,
- ProxyRecordsDiagnoseCreateParams,
- ProxyRecordsRetrieveParams,
- ProxyRecordsRetryCreateParams,
-} from '@/generated/proxy-records/api'
+import * as orvalSchemas from '@/generated/proxy-records/api'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const ProxyCreateSchema = ProxyRecordsCreateBody
+const ProxyCreateSchema = () => {
+ const ProxyRecordsCreateBody = orvalSchemas.ProxyRecordsCreateBody()
+ return ProxyRecordsCreateBody
+}
-const proxyCreate = (): ToolBase<typeof ProxyCreateSchema, Schemas.ProxyRecord> => ({
+const proxyCreate = (): ToolBase<ReturnType<typeof ProxyCreateSchema>, Schemas.ProxyRecord> => ({
name: 'proxy-create',
- schema: ProxyCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ProxyCreateSchema>) => {
+ schema: ProxyCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ProxyCreateSchema>>) => {
const orgId = await context.stateManager.getOrgID()
const body: Record<string, unknown> = {}
if (params.domain !== undefined) {
@@ -32,12 +29,15 @@ const proxyCreate = (): ToolBase<typeof ProxyCreateSchema, Schemas.ProxyRecord>
},
})
-const ProxyDeleteSchema = ProxyRecordsDestroyParams.omit({ organization_id: true })
+const ProxyDeleteSchema = () => {
+ const ProxyRecordsDestroyParams = orvalSchemas.ProxyRecordsDestroyParams()
+ return ProxyRecordsDestroyParams.omit({ organization_id: true })
+}
-const proxyDelete = (): ToolBase<typeof ProxyDeleteSchema, unknown> => ({
+const proxyDelete = (): ToolBase<ReturnType<typeof ProxyDeleteSchema>, unknown> => ({
name: 'proxy-delete',
- schema: ProxyDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof ProxyDeleteSchema>) => {
+ schema: ProxyDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ProxyDeleteSchema>>) => {
const orgId = await context.stateManager.getOrgID()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -47,12 +47,15 @@ const proxyDelete = (): ToolBase<typeof ProxyDeleteSchema, unknown> => ({
},
})
-const ProxyDiagnoseSchema = ProxyRecordsDiagnoseCreateParams.omit({ organization_id: true })
+const ProxyDiagnoseSchema = () => {
+ const ProxyRecordsDiagnoseCreateParams = orvalSchemas.ProxyRecordsDiagnoseCreateParams()
+ return ProxyRecordsDiagnoseCreateParams.omit({ organization_id: true })
+}
-const proxyDiagnose = (): ToolBase<typeof ProxyDiagnoseSchema, Schemas.DiagnosticReport> => ({
+const proxyDiagnose = (): ToolBase<ReturnType<typeof ProxyDiagnoseSchema>, Schemas.DiagnosticReport> => ({
name: 'proxy-diagnose',
- schema: ProxyDiagnoseSchema,
- handler: async (context: Context, params: z.infer<typeof ProxyDiagnoseSchema>) => {
+ schema: ProxyDiagnoseSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ProxyDiagnoseSchema>>) => {
const orgId = await context.stateManager.getOrgID()
const result = await context.api.request<Schemas.DiagnosticReport>({
method: 'POST',
@@ -62,12 +65,15 @@ const proxyDiagnose = (): ToolBase<typeof ProxyDiagnoseSchema, Schemas.Diagnosti
},
})
-const ProxyGetSchema = ProxyRecordsRetrieveParams.omit({ organization_id: true })
+const ProxyGetSchema = () => {
+ const ProxyRecordsRetrieveParams = orvalSchemas.ProxyRecordsRetrieveParams()
+ return ProxyRecordsRetrieveParams.omit({ organization_id: true })
+}
-const proxyGet = (): ToolBase<typeof ProxyGetSchema, Schemas.ProxyRecord> => ({
+const proxyGet = (): ToolBase<ReturnType<typeof ProxyGetSchema>, Schemas.ProxyRecord> => ({
name: 'proxy-get',
- schema: ProxyGetSchema,
- handler: async (context: Context, params: z.infer<typeof ProxyGetSchema>) => {
+ schema: ProxyGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ProxyGetSchema>>) => {
const orgId = await context.stateManager.getOrgID()
const result = await context.api.request<Schemas.ProxyRecord>({
method: 'GET',
@@ -77,13 +83,15 @@ const proxyGet = (): ToolBase<typeof ProxyGetSchema, Schemas.ProxyRecord> => ({
},
})
-const ProxyListSchema = z.object({})
+const ProxyListSchema = () => z.object({})
-const proxyList = (): ToolBase<typeof ProxyListSchema, WithPostHogUrl<Schemas.ProxyRecordListResponse>> => ({
+const proxyList = (): ToolBase<
+ ReturnType<typeof ProxyListSchema>,
+ WithPostHogUrl<Schemas.ProxyRecordListResponse>
+> => ({
name: 'proxy-list',
- schema: ProxyListSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof ProxyListSchema>) => {
+ schema: ProxyListSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof ProxyListSchema>>) => {
const orgId = await context.stateManager.getOrgID()
const result = await context.api.request<Schemas.ProxyRecordListResponse>({
method: 'GET',
@@ -93,12 +101,15 @@ const proxyList = (): ToolBase<typeof ProxyListSchema, WithPostHogUrl<Schemas.Pr
},
})
-const ProxyRetrySchema = ProxyRecordsRetryCreateParams.omit({ organization_id: true })
+const ProxyRetrySchema = () => {
+ const ProxyRecordsRetryCreateParams = orvalSchemas.ProxyRecordsRetryCreateParams()
+ return ProxyRecordsRetryCreateParams.omit({ organization_id: true })
+}
-const proxyRetry = (): ToolBase<typeof ProxyRetrySchema, Schemas.ProxyRecord> => ({
+const proxyRetry = (): ToolBase<ReturnType<typeof ProxyRetrySchema>, Schemas.ProxyRecord> => ({
name: 'proxy-retry',
- schema: ProxyRetrySchema,
- handler: async (context: Context, params: z.infer<typeof ProxyRetrySchema>) => {
+ schema: ProxyRetrySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ProxyRetrySchema>>) => {
const orgId = await context.stateManager.getOrgID()
const result = await context.api.request<Schemas.ProxyRecord>({
method: 'POST',
diff --git a/services/mcp/src/tools/generated/reminders.ts b/services/mcp/src/tools/generated/reminders.ts
index 8c39b4a74d67..a1c1f79689e6 100644
--- a/services/mcp/src/tools/generated/reminders.ts
+++ b/services/mcp/src/tools/generated/reminders.ts
@@ -2,23 +2,19 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- RemindersCreateBody,
- RemindersDestroyParams,
- RemindersListQueryParams,
- RemindersPartialUpdateBody,
- RemindersPartialUpdateParams,
- RemindersRetrieveParams,
-} from '@/generated/reminders/api'
+import * as orvalSchemas from '@/generated/reminders/api'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const ReminderCreateSchema = RemindersCreateBody
+const ReminderCreateSchema = () => {
+ const RemindersCreateBody = orvalSchemas.RemindersCreateBody()
+ return RemindersCreateBody
+}
-const reminderCreate = (): ToolBase<typeof ReminderCreateSchema, Schemas.Reminder> => ({
+const reminderCreate = (): ToolBase<ReturnType<typeof ReminderCreateSchema>, Schemas.Reminder> => ({
name: 'reminder-create',
- schema: ReminderCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ReminderCreateSchema>) => {
+ schema: ReminderCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ReminderCreateSchema>>) => {
const body: Record<string, unknown> = {}
if (params.organization !== undefined) {
body['organization'] = params.organization
@@ -62,12 +58,15 @@ const reminderCreate = (): ToolBase<typeof ReminderCreateSchema, Schemas.Reminde
},
})
-const ReminderDeleteSchema = RemindersDestroyParams
+const ReminderDeleteSchema = () => {
+ const RemindersDestroyParams = orvalSchemas.RemindersDestroyParams()
+ return RemindersDestroyParams
+}
-const reminderDelete = (): ToolBase<typeof ReminderDeleteSchema, Schemas.Reminder> => ({
+const reminderDelete = (): ToolBase<ReturnType<typeof ReminderDeleteSchema>, Schemas.Reminder> => ({
name: 'reminder-delete',
- schema: ReminderDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof ReminderDeleteSchema>) => {
+ schema: ReminderDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ReminderDeleteSchema>>) => {
const result = await context.api.request<Schemas.Reminder>({
method: 'PATCH',
path: `/api/reminders/${encodeURIComponent(String(params.id))}/`,
@@ -77,12 +76,15 @@ const reminderDelete = (): ToolBase<typeof ReminderDeleteSchema, Schemas.Reminde
},
})
-const ReminderGetSchema = RemindersRetrieveParams
+const ReminderGetSchema = () => {
+ const RemindersRetrieveParams = orvalSchemas.RemindersRetrieveParams()
+ return RemindersRetrieveParams
+}
-const reminderGet = (): ToolBase<typeof ReminderGetSchema, Schemas.Reminder> => ({
+const reminderGet = (): ToolBase<ReturnType<typeof ReminderGetSchema>, Schemas.Reminder> => ({
name: 'reminder-get',
- schema: ReminderGetSchema,
- handler: async (context: Context, params: z.infer<typeof ReminderGetSchema>) => {
+ schema: ReminderGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ReminderGetSchema>>) => {
const result = await context.api.request<Schemas.Reminder>({
method: 'GET',
path: `/api/reminders/${encodeURIComponent(String(params.id))}/`,
@@ -91,12 +93,16 @@ const reminderGet = (): ToolBase<typeof ReminderGetSchema, Schemas.Reminder> =>
},
})
-const ReminderUpdateSchema = RemindersPartialUpdateParams.extend(RemindersPartialUpdateBody.shape)
+const ReminderUpdateSchema = () => {
+ const RemindersPartialUpdateBody = orvalSchemas.RemindersPartialUpdateBody()
+ const RemindersPartialUpdateParams = orvalSchemas.RemindersPartialUpdateParams()
+ return RemindersPartialUpdateParams.extend(RemindersPartialUpdateBody.shape)
+}
-const reminderUpdate = (): ToolBase<typeof ReminderUpdateSchema, Schemas.Reminder> => ({
+const reminderUpdate = (): ToolBase<ReturnType<typeof ReminderUpdateSchema>, Schemas.Reminder> => ({
name: 'reminder-update',
- schema: ReminderUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ReminderUpdateSchema>) => {
+ schema: ReminderUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ReminderUpdateSchema>>) => {
const body: Record<string, unknown> = {}
if (params.organization !== undefined) {
body['organization'] = params.organization
@@ -140,12 +146,18 @@ const reminderUpdate = (): ToolBase<typeof ReminderUpdateSchema, Schemas.Reminde
},
})
-const RemindersListSchema = RemindersListQueryParams
+const RemindersListSchema = () => {
+ const RemindersListQueryParams = orvalSchemas.RemindersListQueryParams()
+ return RemindersListQueryParams
+}
-const remindersList = (): ToolBase<typeof RemindersListSchema, WithPostHogUrl<Schemas.PaginatedReminderList>> => ({
+const remindersList = (): ToolBase<
+ ReturnType<typeof RemindersListSchema>,
+ WithPostHogUrl<Schemas.PaginatedReminderList>
+> => ({
name: 'reminders-list',
- schema: RemindersListSchema,
- handler: async (context: Context, params: z.infer<typeof RemindersListSchema>) => {
+ schema: RemindersListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof RemindersListSchema>>) => {
const result = await context.api.request<Schemas.PaginatedReminderList>({
method: 'GET',
path: `/api/reminders/`,
diff --git a/services/mcp/src/tools/generated/replay.ts b/services/mcp/src/tools/generated/replay.ts
index a93d563542d8..71c1f9129a1f 100644
--- a/services/mcp/src/tools/generated/replay.ts
+++ b/services/mcp/src/tools/generated/replay.ts
@@ -2,30 +2,24 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- SessionRecordingPlaylistsCreateBody,
- SessionRecordingPlaylistsListQueryParams,
- SessionRecordingPlaylistsPartialUpdateBody,
- SessionRecordingPlaylistsPartialUpdateParams,
- SessionRecordingPlaylistsRetrieveParams,
- SessionRecordingsBulkDeleteCreateBody,
- SessionRecordingsDestroyParams,
- SessionRecordingsRetrieveParams,
-} from '@/generated/replay/api'
+import * as orvalSchemas from '@/generated/replay/api'
import { withUiApp } from '@/resources/ui-apps'
import { createQueryWrapper } from '@/tools/query-wrapper-factory'
import { withPostHogUrl, omitResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const SessionRecordingBulkDeleteSchema = SessionRecordingsBulkDeleteCreateBody
+const SessionRecordingBulkDeleteSchema = () => {
+ const SessionRecordingsBulkDeleteCreateBody = orvalSchemas.SessionRecordingsBulkDeleteCreateBody()
+ return SessionRecordingsBulkDeleteCreateBody
+}
const sessionRecordingBulkDelete = (): ToolBase<
- typeof SessionRecordingBulkDeleteSchema,
+ ReturnType<typeof SessionRecordingBulkDeleteSchema>,
Schemas.SessionRecordingBulkDeleteResponse
> => ({
name: 'session-recording-bulk-delete',
- schema: SessionRecordingBulkDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof SessionRecordingBulkDeleteSchema>) => {
+ schema: SessionRecordingBulkDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SessionRecordingBulkDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.session_recording_ids !== undefined) {
@@ -43,12 +37,15 @@ const sessionRecordingBulkDelete = (): ToolBase<
},
})
-const SessionRecordingDeleteSchema = SessionRecordingsDestroyParams.omit({ project_id: true })
+const SessionRecordingDeleteSchema = () => {
+ const SessionRecordingsDestroyParams = orvalSchemas.SessionRecordingsDestroyParams()
+ return SessionRecordingsDestroyParams.omit({ project_id: true })
+}
-const sessionRecordingDelete = (): ToolBase<typeof SessionRecordingDeleteSchema, unknown> => ({
+const sessionRecordingDelete = (): ToolBase<ReturnType<typeof SessionRecordingDeleteSchema>, unknown> => ({
name: 'session-recording-delete',
- schema: SessionRecordingDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof SessionRecordingDeleteSchema>) => {
+ schema: SessionRecordingDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SessionRecordingDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -58,13 +55,19 @@ const sessionRecordingDelete = (): ToolBase<typeof SessionRecordingDeleteSchema,
},
})
-const SessionRecordingGetSchema = SessionRecordingsRetrieveParams.omit({ project_id: true })
+const SessionRecordingGetSchema = () => {
+ const SessionRecordingsRetrieveParams = orvalSchemas.SessionRecordingsRetrieveParams()
+ return SessionRecordingsRetrieveParams.omit({ project_id: true })
+}
-const sessionRecordingGet = (): ToolBase<typeof SessionRecordingGetSchema, WithPostHogUrl<Schemas.SessionRecording>> =>
+const sessionRecordingGet = (): ToolBase<
+ ReturnType<typeof SessionRecordingGetSchema>,
+ WithPostHogUrl<Schemas.SessionRecording>
+> =>
withUiApp('session-recording', {
name: 'session-recording-get',
- schema: SessionRecordingGetSchema,
- handler: async (context: Context, params: z.infer<typeof SessionRecordingGetSchema>) => {
+ schema: SessionRecordingGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SessionRecordingGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SessionRecording>({
method: 'GET',
@@ -75,15 +78,18 @@ const sessionRecordingGet = (): ToolBase<typeof SessionRecordingGetSchema, WithP
},
})
-const SessionRecordingPlaylistCreateSchema = SessionRecordingPlaylistsCreateBody
+const SessionRecordingPlaylistCreateSchema = () => {
+ const SessionRecordingPlaylistsCreateBody = orvalSchemas.SessionRecordingPlaylistsCreateBody()
+ return SessionRecordingPlaylistsCreateBody
+}
const sessionRecordingPlaylistCreate = (): ToolBase<
- typeof SessionRecordingPlaylistCreateSchema,
+ ReturnType<typeof SessionRecordingPlaylistCreateSchema>,
Schemas.SessionRecordingPlaylist
> => ({
name: 'session-recording-playlist-create',
- schema: SessionRecordingPlaylistCreateSchema,
- handler: async (context: Context, params: z.infer<typeof SessionRecordingPlaylistCreateSchema>) => {
+ schema: SessionRecordingPlaylistCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SessionRecordingPlaylistCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -116,15 +122,18 @@ const sessionRecordingPlaylistCreate = (): ToolBase<
},
})
-const SessionRecordingPlaylistGetSchema = SessionRecordingPlaylistsRetrieveParams.omit({ project_id: true })
+const SessionRecordingPlaylistGetSchema = () => {
+ const SessionRecordingPlaylistsRetrieveParams = orvalSchemas.SessionRecordingPlaylistsRetrieveParams()
+ return SessionRecordingPlaylistsRetrieveParams.omit({ project_id: true })
+}
const sessionRecordingPlaylistGet = (): ToolBase<
- typeof SessionRecordingPlaylistGetSchema,
+ ReturnType<typeof SessionRecordingPlaylistGetSchema>,
Schemas.SessionRecordingPlaylist
> => ({
name: 'session-recording-playlist-get',
- schema: SessionRecordingPlaylistGetSchema,
- handler: async (context: Context, params: z.infer<typeof SessionRecordingPlaylistGetSchema>) => {
+ schema: SessionRecordingPlaylistGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SessionRecordingPlaylistGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SessionRecordingPlaylist>({
method: 'GET',
@@ -134,17 +143,21 @@ const sessionRecordingPlaylistGet = (): ToolBase<
},
})
-const SessionRecordingPlaylistUpdateSchema = SessionRecordingPlaylistsPartialUpdateParams.omit({
- project_id: true,
-}).extend(SessionRecordingPlaylistsPartialUpdateBody.shape)
+const SessionRecordingPlaylistUpdateSchema = () => {
+ const SessionRecordingPlaylistsPartialUpdateBody = orvalSchemas.SessionRecordingPlaylistsPartialUpdateBody()
+ const SessionRecordingPlaylistsPartialUpdateParams = orvalSchemas.SessionRecordingPlaylistsPartialUpdateParams()
+ return SessionRecordingPlaylistsPartialUpdateParams.omit({ project_id: true }).extend(
+ SessionRecordingPlaylistsPartialUpdateBody.shape
+ )
+}
const sessionRecordingPlaylistUpdate = (): ToolBase<
- typeof SessionRecordingPlaylistUpdateSchema,
+ ReturnType<typeof SessionRecordingPlaylistUpdateSchema>,
Schemas.SessionRecordingPlaylist
> => ({
name: 'session-recording-playlist-update',
- schema: SessionRecordingPlaylistUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof SessionRecordingPlaylistUpdateSchema>) => {
+ schema: SessionRecordingPlaylistUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SessionRecordingPlaylistUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -174,15 +187,18 @@ const sessionRecordingPlaylistUpdate = (): ToolBase<
},
})
-const SessionRecordingPlaylistsListSchema = SessionRecordingPlaylistsListQueryParams
+const SessionRecordingPlaylistsListSchema = () => {
+ const SessionRecordingPlaylistsListQueryParams = orvalSchemas.SessionRecordingPlaylistsListQueryParams()
+ return SessionRecordingPlaylistsListQueryParams
+}
const sessionRecordingPlaylistsList = (): ToolBase<
- typeof SessionRecordingPlaylistsListSchema,
+ ReturnType<typeof SessionRecordingPlaylistsListSchema>,
WithPostHogUrl<Schemas.PaginatedSessionRecordingPlaylistList>
> => ({
name: 'session-recording-playlists-list',
- schema: SessionRecordingPlaylistsListSchema,
- handler: async (context: Context, params: z.infer<typeof SessionRecordingPlaylistsListSchema>) => {
+ schema: SessionRecordingPlaylistsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SessionRecordingPlaylistsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedSessionRecordingPlaylistList>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/replay_vision.ts b/services/mcp/src/tools/generated/replay_vision.ts
index fd6f84e332e6..1aede1466771 100644
--- a/services/mcp/src/tools/generated/replay_vision.ts
+++ b/services/mcp/src/tools/generated/replay_vision.ts
@@ -2,59 +2,20 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- VisionActionsCreateBody,
- VisionActionsDestroyParams,
- VisionActionsListQueryParams,
- VisionActionsPartialUpdateBody,
- VisionActionsPartialUpdateParams,
- VisionActionsRetrieveParams,
- VisionActionsRunsListParams,
- VisionActionsRunsListQueryParams,
- VisionActionsRunsRetrieveParams,
- VisionObservationsLabelCreateBody,
- VisionObservationsLabelCreateParams,
- VisionObservationsLabelDestroyParams,
- VisionObservationsListQueryParams,
- VisionObservationsRetrieveParams,
- VisionObservationsRetrieveQueryParams,
- VisionObservationsSearchRetrieveQueryParams,
- VisionScannersAffectedCohortCreateBody,
- VisionScannersAffectedCohortCreateParams,
- VisionScannersCreateBody,
- VisionScannersDestroyParams,
- VisionScannersEstimateCreateBody,
- VisionScannersImpactRetrieveParams,
- VisionScannersImpactRetrieveQueryParams,
- VisionScannersInlineScanCreateBody,
- VisionScannersListQueryParams,
- VisionScannersObservationsListParams,
- VisionScannersObservationsListQueryParams,
- VisionScannersObservationsRetrieveParams,
- VisionScannersObservationsRetrieveQueryParams,
- VisionScannersObservationsStatsRetrieveParams,
- VisionScannersObservationsStatsRetrieveQueryParams,
- VisionScannersObserveCreateBody,
- VisionScannersObserveCreateParams,
- VisionScannersPartialUpdateBody,
- VisionScannersPartialUpdateParams,
- VisionScannersPromptSuggestionsApplyCreateBody,
- VisionScannersPromptSuggestionsApplyCreateParams,
- VisionScannersPromptSuggestionsCurrentRetrieveParams,
- VisionScannersPromptSuggestionsDismissCreateParams,
- VisionScannersPromptSuggestionsGenerateCreateParams,
- VisionScannersRetrieveParams,
-} from '@/generated/replay_vision/api'
+import * as orvalSchemas from '@/generated/replay_vision/api'
import { withUiApp } from '@/resources/ui-apps'
import { withPostHogUrl, withAgentNote, type WithPostHogUrl, type WithAgentNote } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const VisionActionsCreateSchema = VisionActionsCreateBody
+const VisionActionsCreateSchema = () => {
+ const VisionActionsCreateBody = orvalSchemas.VisionActionsCreateBody()
+ return VisionActionsCreateBody
+}
-const visionActionsCreate = (): ToolBase<typeof VisionActionsCreateSchema, Schemas.VisionAction> => ({
+const visionActionsCreate = (): ToolBase<ReturnType<typeof VisionActionsCreateSchema>, Schemas.VisionAction> => ({
name: 'vision-actions-create',
- schema: VisionActionsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof VisionActionsCreateSchema>) => {
+ schema: VisionActionsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionActionsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -99,12 +60,15 @@ const visionActionsCreate = (): ToolBase<typeof VisionActionsCreateSchema, Schem
},
})
-const VisionActionsDeleteSchema = VisionActionsDestroyParams.omit({ project_id: true })
+const VisionActionsDeleteSchema = () => {
+ const VisionActionsDestroyParams = orvalSchemas.VisionActionsDestroyParams()
+ return VisionActionsDestroyParams.omit({ project_id: true })
+}
-const visionActionsDelete = (): ToolBase<typeof VisionActionsDeleteSchema, unknown> => ({
+const visionActionsDelete = (): ToolBase<ReturnType<typeof VisionActionsDeleteSchema>, unknown> => ({
name: 'vision-actions-delete',
- schema: VisionActionsDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof VisionActionsDeleteSchema>) => {
+ schema: VisionActionsDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionActionsDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -114,15 +78,18 @@ const visionActionsDelete = (): ToolBase<typeof VisionActionsDeleteSchema, unkno
},
})
-const VisionActionsListSchema = VisionActionsListQueryParams
+const VisionActionsListSchema = () => {
+ const VisionActionsListQueryParams = orvalSchemas.VisionActionsListQueryParams()
+ return VisionActionsListQueryParams
+}
const visionActionsList = (): ToolBase<
- typeof VisionActionsListSchema,
+ ReturnType<typeof VisionActionsListSchema>,
WithPostHogUrl<Schemas.PaginatedVisionActionList>
> => ({
name: 'vision-actions-list',
- schema: VisionActionsListSchema,
- handler: async (context: Context, params: z.infer<typeof VisionActionsListSchema>) => {
+ schema: VisionActionsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionActionsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedVisionActionList>({
method: 'GET',
@@ -137,12 +104,15 @@ const visionActionsList = (): ToolBase<
},
})
-const VisionActionsRetrieveSchema = VisionActionsRetrieveParams.omit({ project_id: true })
+const VisionActionsRetrieveSchema = () => {
+ const VisionActionsRetrieveParams = orvalSchemas.VisionActionsRetrieveParams()
+ return VisionActionsRetrieveParams.omit({ project_id: true })
+}
-const visionActionsRetrieve = (): ToolBase<typeof VisionActionsRetrieveSchema, Schemas.VisionAction> => ({
+const visionActionsRetrieve = (): ToolBase<ReturnType<typeof VisionActionsRetrieveSchema>, Schemas.VisionAction> => ({
name: 'vision-actions-retrieve',
- schema: VisionActionsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof VisionActionsRetrieveSchema>) => {
+ schema: VisionActionsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionActionsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.VisionAction>({
method: 'GET',
@@ -152,17 +122,19 @@ const visionActionsRetrieve = (): ToolBase<typeof VisionActionsRetrieveSchema, S
},
})
-const VisionActionsRunsListSchema = VisionActionsRunsListParams.omit({ project_id: true }).extend(
- VisionActionsRunsListQueryParams.shape
-)
+const VisionActionsRunsListSchema = () => {
+ const VisionActionsRunsListParams = orvalSchemas.VisionActionsRunsListParams()
+ const VisionActionsRunsListQueryParams = orvalSchemas.VisionActionsRunsListQueryParams()
+ return VisionActionsRunsListParams.omit({ project_id: true }).extend(VisionActionsRunsListQueryParams.shape)
+}
const visionActionsRunsList = (): ToolBase<
- typeof VisionActionsRunsListSchema,
+ ReturnType<typeof VisionActionsRunsListSchema>,
WithPostHogUrl<Schemas.PaginatedVisionActionRunListList>
> => ({
name: 'vision-actions-runs-list',
- schema: VisionActionsRunsListSchema,
- handler: async (context: Context, params: z.infer<typeof VisionActionsRunsListSchema>) => {
+ schema: VisionActionsRunsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionActionsRunsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedVisionActionRunListList>({
method: 'GET',
@@ -176,12 +148,18 @@ const visionActionsRunsList = (): ToolBase<
},
})
-const VisionActionsRunsRetrieveSchema = VisionActionsRunsRetrieveParams.omit({ project_id: true })
+const VisionActionsRunsRetrieveSchema = () => {
+ const VisionActionsRunsRetrieveParams = orvalSchemas.VisionActionsRunsRetrieveParams()
+ return VisionActionsRunsRetrieveParams.omit({ project_id: true })
+}
-const visionActionsRunsRetrieve = (): ToolBase<typeof VisionActionsRunsRetrieveSchema, Schemas.VisionActionRun> => ({
+const visionActionsRunsRetrieve = (): ToolBase<
+ ReturnType<typeof VisionActionsRunsRetrieveSchema>,
+ Schemas.VisionActionRun
+> => ({
name: 'vision-actions-runs-retrieve',
- schema: VisionActionsRunsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof VisionActionsRunsRetrieveSchema>) => {
+ schema: VisionActionsRunsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionActionsRunsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.VisionActionRun>({
method: 'GET',
@@ -191,14 +169,16 @@ const visionActionsRunsRetrieve = (): ToolBase<typeof VisionActionsRunsRetrieveS
},
})
-const VisionActionsUpdateSchema = VisionActionsPartialUpdateParams.omit({ project_id: true }).extend(
- VisionActionsPartialUpdateBody.shape
-)
+const VisionActionsUpdateSchema = () => {
+ const VisionActionsPartialUpdateBody = orvalSchemas.VisionActionsPartialUpdateBody()
+ const VisionActionsPartialUpdateParams = orvalSchemas.VisionActionsPartialUpdateParams()
+ return VisionActionsPartialUpdateParams.omit({ project_id: true }).extend(VisionActionsPartialUpdateBody.shape)
+}
-const visionActionsUpdate = (): ToolBase<typeof VisionActionsUpdateSchema, Schemas.VisionAction> => ({
+const visionActionsUpdate = (): ToolBase<ReturnType<typeof VisionActionsUpdateSchema>, Schemas.VisionAction> => ({
name: 'vision-actions-update',
- schema: VisionActionsUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof VisionActionsUpdateSchema>) => {
+ schema: VisionActionsUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionActionsUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -243,17 +223,21 @@ const visionActionsUpdate = (): ToolBase<typeof VisionActionsUpdateSchema, Schem
},
})
-const VisionObservationsLabelCreateSchema = VisionObservationsLabelCreateParams.omit({ project_id: true }).extend(
- VisionObservationsLabelCreateBody.shape
-)
+const VisionObservationsLabelCreateSchema = () => {
+ const VisionObservationsLabelCreateBody = orvalSchemas.VisionObservationsLabelCreateBody()
+ const VisionObservationsLabelCreateParams = orvalSchemas.VisionObservationsLabelCreateParams()
+ return VisionObservationsLabelCreateParams.omit({ project_id: true }).extend(
+ VisionObservationsLabelCreateBody.shape
+ )
+}
const visionObservationsLabelCreate = (): ToolBase<
- typeof VisionObservationsLabelCreateSchema,
+ ReturnType<typeof VisionObservationsLabelCreateSchema>,
Schemas.ReplayObservationLabel
> => ({
name: 'vision-observations-label-create',
- schema: VisionObservationsLabelCreateSchema,
- handler: async (context: Context, params: z.infer<typeof VisionObservationsLabelCreateSchema>) => {
+ schema: VisionObservationsLabelCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionObservationsLabelCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.is_correct !== undefined) {
@@ -271,12 +255,18 @@ const visionObservationsLabelCreate = (): ToolBase<
},
})
-const VisionObservationsLabelDestroySchema = VisionObservationsLabelDestroyParams.omit({ project_id: true })
+const VisionObservationsLabelDestroySchema = () => {
+ const VisionObservationsLabelDestroyParams = orvalSchemas.VisionObservationsLabelDestroyParams()
+ return VisionObservationsLabelDestroyParams.omit({ project_id: true })
+}
-const visionObservationsLabelDestroy = (): ToolBase<typeof VisionObservationsLabelDestroySchema, unknown> => ({
+const visionObservationsLabelDestroy = (): ToolBase<
+ ReturnType<typeof VisionObservationsLabelDestroySchema>,
+ unknown
+> => ({
name: 'vision-observations-label-destroy',
- schema: VisionObservationsLabelDestroySchema,
- handler: async (context: Context, params: z.infer<typeof VisionObservationsLabelDestroySchema>) => {
+ schema: VisionObservationsLabelDestroySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionObservationsLabelDestroySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -286,16 +276,19 @@ const visionObservationsLabelDestroy = (): ToolBase<typeof VisionObservationsLab
},
})
-const VisionObservationsListSchema = VisionObservationsListQueryParams
+const VisionObservationsListSchema = () => {
+ const VisionObservationsListQueryParams = orvalSchemas.VisionObservationsListQueryParams()
+ return VisionObservationsListQueryParams
+}
const visionObservationsList = (): ToolBase<
- typeof VisionObservationsListSchema,
+ ReturnType<typeof VisionObservationsListSchema>,
WithAgentNote<WithPostHogUrl<Schemas.PaginatedReplayObservationList>>
> =>
withUiApp('vision-observation-list', {
name: 'vision-observations-list',
- schema: VisionObservationsListSchema,
- handler: async (context: Context, params: z.infer<typeof VisionObservationsListSchema>) => {
+ schema: VisionObservationsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionObservationsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedReplayObservationList>({
method: 'GET',
@@ -325,17 +318,21 @@ const visionObservationsList = (): ToolBase<
},
})
-const VisionObservationsRetrieveSchema = VisionObservationsRetrieveParams.omit({ project_id: true }).extend(
- VisionObservationsRetrieveQueryParams.shape
-)
+const VisionObservationsRetrieveSchema = () => {
+ const VisionObservationsRetrieveParams = orvalSchemas.VisionObservationsRetrieveParams()
+ const VisionObservationsRetrieveQueryParams = orvalSchemas.VisionObservationsRetrieveQueryParams()
+ return VisionObservationsRetrieveParams.omit({ project_id: true }).extend(
+ VisionObservationsRetrieveQueryParams.shape
+ )
+}
const visionObservationsRetrieve = (): ToolBase<
- typeof VisionObservationsRetrieveSchema,
+ ReturnType<typeof VisionObservationsRetrieveSchema>,
WithAgentNote<WithPostHogUrl<Schemas.ReplayObservation>>
> => ({
name: 'vision-observations-retrieve',
- schema: VisionObservationsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof VisionObservationsRetrieveSchema>) => {
+ schema: VisionObservationsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionObservationsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ReplayObservation>({
method: 'GET',
@@ -363,15 +360,18 @@ const visionObservationsRetrieve = (): ToolBase<
},
})
-const VisionObservationsSearchSchema = VisionObservationsSearchRetrieveQueryParams
+const VisionObservationsSearchSchema = () => {
+ const VisionObservationsSearchRetrieveQueryParams = orvalSchemas.VisionObservationsSearchRetrieveQueryParams()
+ return VisionObservationsSearchRetrieveQueryParams
+}
const visionObservationsSearch = (): ToolBase<
- typeof VisionObservationsSearchSchema,
+ ReturnType<typeof VisionObservationsSearchSchema>,
Schemas.ObservationSearchResponse
> => ({
name: 'vision-observations-search',
- schema: VisionObservationsSearchSchema,
- handler: async (context: Context, params: z.infer<typeof VisionObservationsSearchSchema>) => {
+ schema: VisionObservationsSearchSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionObservationsSearchSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ObservationSearchResponse>({
method: 'GET',
@@ -390,13 +390,12 @@ const visionObservationsSearch = (): ToolBase<
},
})
-const VisionQuotaRetrieveSchema = z.object({})
+const VisionQuotaRetrieveSchema = () => z.object({})
-const visionQuotaRetrieve = (): ToolBase<typeof VisionQuotaRetrieveSchema, Schemas.VisionQuota> => ({
+const visionQuotaRetrieve = (): ToolBase<ReturnType<typeof VisionQuotaRetrieveSchema>, Schemas.VisionQuota> => ({
name: 'vision-quota-retrieve',
- schema: VisionQuotaRetrieveSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof VisionQuotaRetrieveSchema>) => {
+ schema: VisionQuotaRetrieveSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof VisionQuotaRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.VisionQuota>({
method: 'GET',
@@ -406,17 +405,21 @@ const visionQuotaRetrieve = (): ToolBase<typeof VisionQuotaRetrieveSchema, Schem
},
})
-const VisionScannersAffectedCohortCreateSchema = VisionScannersAffectedCohortCreateParams.omit({
- project_id: true,
-}).extend(VisionScannersAffectedCohortCreateBody.shape)
+const VisionScannersAffectedCohortCreateSchema = () => {
+ const VisionScannersAffectedCohortCreateBody = orvalSchemas.VisionScannersAffectedCohortCreateBody()
+ const VisionScannersAffectedCohortCreateParams = orvalSchemas.VisionScannersAffectedCohortCreateParams()
+ return VisionScannersAffectedCohortCreateParams.omit({ project_id: true }).extend(
+ VisionScannersAffectedCohortCreateBody.shape
+ )
+}
const visionScannersAffectedCohortCreate = (): ToolBase<
- typeof VisionScannersAffectedCohortCreateSchema,
+ ReturnType<typeof VisionScannersAffectedCohortCreateSchema>,
Schemas.AffectedCohortResponse
> => ({
name: 'vision-scanners-affected-cohort-create',
- schema: VisionScannersAffectedCohortCreateSchema,
- handler: async (context: Context, params: z.infer<typeof VisionScannersAffectedCohortCreateSchema>) => {
+ schema: VisionScannersAffectedCohortCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionScannersAffectedCohortCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.window_days !== undefined) {
@@ -440,12 +443,15 @@ const visionScannersAffectedCohortCreate = (): ToolBase<
},
})
-const VisionScannersCreateSchema = VisionScannersCreateBody
+const VisionScannersCreateSchema = () => {
+ const VisionScannersCreateBody = orvalSchemas.VisionScannersCreateBody()
+ return VisionScannersCreateBody
+}
-const visionScannersCreate = (): ToolBase<typeof VisionScannersCreateSchema, Schemas.ReplayScanner> => ({
+const visionScannersCreate = (): ToolBase<ReturnType<typeof VisionScannersCreateSchema>, Schemas.ReplayScanner> => ({
name: 'vision-scanners-create',
- schema: VisionScannersCreateSchema,
- handler: async (context: Context, params: z.infer<typeof VisionScannersCreateSchema>) => {
+ schema: VisionScannersCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionScannersCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -499,12 +505,15 @@ const visionScannersCreate = (): ToolBase<typeof VisionScannersCreateSchema, Sch
},
})
-const VisionScannersDeleteSchema = VisionScannersDestroyParams.omit({ project_id: true })
+const VisionScannersDeleteSchema = () => {
+ const VisionScannersDestroyParams = orvalSchemas.VisionScannersDestroyParams()
+ return VisionScannersDestroyParams.omit({ project_id: true })
+}
-const visionScannersDelete = (): ToolBase<typeof VisionScannersDeleteSchema, unknown> => ({
+const visionScannersDelete = (): ToolBase<ReturnType<typeof VisionScannersDeleteSchema>, unknown> => ({
name: 'vision-scanners-delete',
- schema: VisionScannersDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof VisionScannersDeleteSchema>) => {
+ schema: VisionScannersDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionScannersDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -514,15 +523,18 @@ const visionScannersDelete = (): ToolBase<typeof VisionScannersDeleteSchema, unk
},
})
-const VisionScannersEstimateCreateSchema = VisionScannersEstimateCreateBody
+const VisionScannersEstimateCreateSchema = () => {
+ const VisionScannersEstimateCreateBody = orvalSchemas.VisionScannersEstimateCreateBody()
+ return VisionScannersEstimateCreateBody
+}
const visionScannersEstimateCreate = (): ToolBase<
- typeof VisionScannersEstimateCreateSchema,
+ ReturnType<typeof VisionScannersEstimateCreateSchema>,
Schemas.EstimateResponse
> => ({
name: 'vision-scanners-estimate-create',
- schema: VisionScannersEstimateCreateSchema,
- handler: async (context: Context, params: z.infer<typeof VisionScannersEstimateCreateSchema>) => {
+ schema: VisionScannersEstimateCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionScannersEstimateCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
@@ -552,12 +564,15 @@ const visionScannersEstimateCreate = (): ToolBase<
},
})
-const VisionScannersGetSchema = VisionScannersRetrieveParams.omit({ project_id: true })
+const VisionScannersGetSchema = () => {
+ const VisionScannersRetrieveParams = orvalSchemas.VisionScannersRetrieveParams()
+ return VisionScannersRetrieveParams.omit({ project_id: true })
+}
-const visionScannersGet = (): ToolBase<typeof VisionScannersGetSchema, Schemas.ReplayScanner> => ({
+const visionScannersGet = (): ToolBase<ReturnType<typeof VisionScannersGetSchema>, Schemas.ReplayScanner> => ({
name: 'vision-scanners-get',
- schema: VisionScannersGetSchema,
- handler: async (context: Context, params: z.infer<typeof VisionScannersGetSchema>) => {
+ schema: VisionScannersGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionScannersGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ReplayScanner>({
method: 'GET',
@@ -567,17 +582,21 @@ const visionScannersGet = (): ToolBase<typeof VisionScannersGetSchema, Schemas.R
},
})
-const VisionScannersImpactRetrieveSchema = VisionScannersImpactRetrieveParams.omit({ project_id: true }).extend(
- VisionScannersImpactRetrieveQueryParams.shape
-)
+const VisionScannersImpactRetrieveSchema = () => {
+ const VisionScannersImpactRetrieveParams = orvalSchemas.VisionScannersImpactRetrieveParams()
+ const VisionScannersImpactRetrieveQueryParams = orvalSchemas.VisionScannersImpactRetrieveQueryParams()
+ return VisionScannersImpactRetrieveParams.omit({ project_id: true }).extend(
+ VisionScannersImpactRetrieveQueryParams.shape
+ )
+}
const visionScannersImpactRetrieve = (): ToolBase<
- typeof VisionScannersImpactRetrieveSchema,
+ ReturnType<typeof VisionScannersImpactRetrieveSchema>,
Schemas.ScannerImpact
> => ({
name: 'vision-scanners-impact-retrieve',
- schema: VisionScannersImpactRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof VisionScannersImpactRetrieveSchema>) => {
+ schema: VisionScannersImpactRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionScannersImpactRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ScannerImpact>({
method: 'GET',
@@ -593,13 +612,16 @@ const visionScannersImpactRetrieve = (): ToolBase<
},
})
-const VisionScannersInlineScanCreateSchema = VisionScannersInlineScanCreateBody
+const VisionScannersInlineScanCreateSchema = () => {
+ const VisionScannersInlineScanCreateBody = orvalSchemas.VisionScannersInlineScanCreateBody()
+ return VisionScannersInlineScanCreateBody
+}
-const visionScannersInlineScanCreate = (): ToolBase<typeof VisionScannersInlineScanCreateSchema, unknown> =>
+const visionScannersInlineScanCreate = (): ToolBase<ReturnType<typeof VisionScannersInlineScanCreateSchema>, unknown> =>
withUiApp('inline-scan', {
name: 'vision-scanners-inline-scan-create',
- schema: VisionScannersInlineScanCreateSchema,
- handler: async (context: Context, params: z.infer<typeof VisionScannersInlineScanCreateSchema>) => {
+ schema: VisionScannersInlineScanCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionScannersInlineScanCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.session_ids !== undefined) {
@@ -626,15 +648,18 @@ const visionScannersInlineScanCreate = (): ToolBase<typeof VisionScannersInlineS
},
})
-const VisionScannersListSchema = VisionScannersListQueryParams
+const VisionScannersListSchema = () => {
+ const VisionScannersListQueryParams = orvalSchemas.VisionScannersListQueryParams()
+ return VisionScannersListQueryParams
+}
const visionScannersList = (): ToolBase<
- typeof VisionScannersListSchema,
+ ReturnType<typeof VisionScannersListSchema>,
WithPostHogUrl<Schemas.PaginatedReplayScannerList>
> => ({
name: 'vision-scanners-list',
- schema: VisionScannersListSchema,
- handler: async (context: Context, params: z.infer<typeof VisionScannersListSchema>) => {
+ schema: VisionScannersListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionScannersListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedReplayScannerList>({
method: 'GET',
@@ -656,17 +681,21 @@ const visionScannersList = (): ToolBase<
},
})
-const VisionScannersObservationsGetSchema = VisionScannersObservationsRetrieveParams.omit({ project_id: true }).extend(
- VisionScannersObservationsRetrieveQueryParams.shape
-)
+const VisionScannersObservationsGetSchema = () => {
+ const VisionScannersObservationsRetrieveParams = orvalSchemas.VisionScannersObservationsRetrieveParams()
+ const VisionScannersObservationsRetrieveQueryParams = orvalSchemas.VisionScannersObservationsRetrieveQueryParams()
+ return VisionScannersObservationsRetrieveParams.omit({ project_id: true }).extend(
+ VisionScannersObservationsRetrieveQueryParams.shape
+ )
+}
const visionScannersObservationsGet = (): ToolBase<
- typeof VisionScannersObservationsGetSchema,
+ ReturnType<typeof VisionScannersObservationsGetSchema>,
WithAgentNote<WithPostHogUrl<Schemas.ReplayObservation>>
> => ({
name: 'vision-scanners-observations-get',
- schema: VisionScannersObservationsGetSchema,
- handler: async (context: Context, params: z.infer<typeof VisionScannersObservationsGetSchema>) => {
+ schema: VisionScannersObservationsGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionScannersObservationsGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ReplayObservation>({
method: 'GET',
@@ -694,18 +723,22 @@ const visionScannersObservationsGet = (): ToolBase<
},
})
-const VisionScannersObservationsListSchema = VisionScannersObservationsListParams.omit({ project_id: true }).extend(
- VisionScannersObservationsListQueryParams.shape
-)
+const VisionScannersObservationsListSchema = () => {
+ const VisionScannersObservationsListParams = orvalSchemas.VisionScannersObservationsListParams()
+ const VisionScannersObservationsListQueryParams = orvalSchemas.VisionScannersObservationsListQueryParams()
+ return VisionScannersObservationsListParams.omit({ project_id: true }).extend(
+ VisionScannersObservationsListQueryParams.shape
+ )
+}
const visionScannersObservationsList = (): ToolBase<
- typeof VisionScannersObservationsListSchema,
+ ReturnType<typeof VisionScannersObservationsListSchema>,
WithAgentNote<WithPostHogUrl<Schemas.PaginatedReplayObservationList>>
> =>
withUiApp('vision-observation-list', {
name: 'vision-scanners-observations-list',
- schema: VisionScannersObservationsListSchema,
- handler: async (context: Context, params: z.infer<typeof VisionScannersObservationsListSchema>) => {
+ schema: VisionScannersObservationsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionScannersObservationsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedReplayObservationList>({
method: 'GET',
@@ -746,17 +779,22 @@ const visionScannersObservationsList = (): ToolBase<
},
})
-const VisionScannersObservationsStatsSchema = VisionScannersObservationsStatsRetrieveParams.omit({
- project_id: true,
-}).extend(VisionScannersObservationsStatsRetrieveQueryParams.shape)
+const VisionScannersObservationsStatsSchema = () => {
+ const VisionScannersObservationsStatsRetrieveParams = orvalSchemas.VisionScannersObservationsStatsRetrieveParams()
+ const VisionScannersObservationsStatsRetrieveQueryParams =
+ orvalSchemas.VisionScannersObservationsStatsRetrieveQueryParams()
+ return VisionScannersObservationsStatsRetrieveParams.omit({ project_id: true }).extend(
+ VisionScannersObservationsStatsRetrieveQueryParams.shape
+ )
+}
const visionScannersObservationsStats = (): ToolBase<
- typeof VisionScannersObservationsStatsSchema,
+ ReturnType<typeof VisionScannersObservationsStatsSchema>,
Schemas.ObservationStats
> => ({
name: 'vision-scanners-observations-stats',
- schema: VisionScannersObservationsStatsSchema,
- handler: async (context: Context, params: z.infer<typeof VisionScannersObservationsStatsSchema>) => {
+ schema: VisionScannersObservationsStatsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionScannersObservationsStatsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ObservationStats>({
method: 'GET',
@@ -781,17 +819,25 @@ const visionScannersObservationsStats = (): ToolBase<
},
})
-const VisionScannersPromptSuggestionsApplySchema = VisionScannersPromptSuggestionsApplyCreateParams.omit({
- project_id: true,
-}).extend(VisionScannersPromptSuggestionsApplyCreateBody.shape)
+const VisionScannersPromptSuggestionsApplySchema = () => {
+ const VisionScannersPromptSuggestionsApplyCreateBody = orvalSchemas.VisionScannersPromptSuggestionsApplyCreateBody()
+ const VisionScannersPromptSuggestionsApplyCreateParams =
+ orvalSchemas.VisionScannersPromptSuggestionsApplyCreateParams()
+ return VisionScannersPromptSuggestionsApplyCreateParams.omit({ project_id: true }).extend(
+ VisionScannersPromptSuggestionsApplyCreateBody.shape
+ )
+}
const visionScannersPromptSuggestionsApply = (): ToolBase<
- typeof VisionScannersPromptSuggestionsApplySchema,
+ ReturnType<typeof VisionScannersPromptSuggestionsApplySchema>,
Schemas.ReplayScannerPromptSuggestion
> => ({
name: 'vision-scanners-prompt-suggestions-apply',
- schema: VisionScannersPromptSuggestionsApplySchema,
- handler: async (context: Context, params: z.infer<typeof VisionScannersPromptSuggestionsApplySchema>) => {
+ schema: VisionScannersPromptSuggestionsApplySchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof VisionScannersPromptSuggestionsApplySchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.config !== undefined) {
@@ -806,17 +852,22 @@ const visionScannersPromptSuggestionsApply = (): ToolBase<
},
})
-const VisionScannersPromptSuggestionsCurrentSchema = VisionScannersPromptSuggestionsCurrentRetrieveParams.omit({
- project_id: true,
-})
+const VisionScannersPromptSuggestionsCurrentSchema = () => {
+ const VisionScannersPromptSuggestionsCurrentRetrieveParams =
+ orvalSchemas.VisionScannersPromptSuggestionsCurrentRetrieveParams()
+ return VisionScannersPromptSuggestionsCurrentRetrieveParams.omit({ project_id: true })
+}
const visionScannersPromptSuggestionsCurrent = (): ToolBase<
- typeof VisionScannersPromptSuggestionsCurrentSchema,
+ ReturnType<typeof VisionScannersPromptSuggestionsCurrentSchema>,
Schemas.CurrentPromptSuggestion
> => ({
name: 'vision-scanners-prompt-suggestions-current',
- schema: VisionScannersPromptSuggestionsCurrentSchema,
- handler: async (context: Context, params: z.infer<typeof VisionScannersPromptSuggestionsCurrentSchema>) => {
+ schema: VisionScannersPromptSuggestionsCurrentSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof VisionScannersPromptSuggestionsCurrentSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.CurrentPromptSuggestion>({
method: 'GET',
@@ -826,17 +877,22 @@ const visionScannersPromptSuggestionsCurrent = (): ToolBase<
},
})
-const VisionScannersPromptSuggestionsDismissSchema = VisionScannersPromptSuggestionsDismissCreateParams.omit({
- project_id: true,
-})
+const VisionScannersPromptSuggestionsDismissSchema = () => {
+ const VisionScannersPromptSuggestionsDismissCreateParams =
+ orvalSchemas.VisionScannersPromptSuggestionsDismissCreateParams()
+ return VisionScannersPromptSuggestionsDismissCreateParams.omit({ project_id: true })
+}
const visionScannersPromptSuggestionsDismiss = (): ToolBase<
- typeof VisionScannersPromptSuggestionsDismissSchema,
+ ReturnType<typeof VisionScannersPromptSuggestionsDismissSchema>,
Schemas.ReplayScannerPromptSuggestion
> => ({
name: 'vision-scanners-prompt-suggestions-dismiss',
- schema: VisionScannersPromptSuggestionsDismissSchema,
- handler: async (context: Context, params: z.infer<typeof VisionScannersPromptSuggestionsDismissSchema>) => {
+ schema: VisionScannersPromptSuggestionsDismissSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof VisionScannersPromptSuggestionsDismissSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ReplayScannerPromptSuggestion>({
method: 'POST',
@@ -846,17 +902,22 @@ const visionScannersPromptSuggestionsDismiss = (): ToolBase<
},
})
-const VisionScannersPromptSuggestionsGenerateSchema = VisionScannersPromptSuggestionsGenerateCreateParams.omit({
- project_id: true,
-})
+const VisionScannersPromptSuggestionsGenerateSchema = () => {
+ const VisionScannersPromptSuggestionsGenerateCreateParams =
+ orvalSchemas.VisionScannersPromptSuggestionsGenerateCreateParams()
+ return VisionScannersPromptSuggestionsGenerateCreateParams.omit({ project_id: true })
+}
const visionScannersPromptSuggestionsGenerate = (): ToolBase<
- typeof VisionScannersPromptSuggestionsGenerateSchema,
+ ReturnType<typeof VisionScannersPromptSuggestionsGenerateSchema>,
Schemas.ReplayScannerPromptSuggestion
> => ({
name: 'vision-scanners-prompt-suggestions-generate',
- schema: VisionScannersPromptSuggestionsGenerateSchema,
- handler: async (context: Context, params: z.infer<typeof VisionScannersPromptSuggestionsGenerateSchema>) => {
+ schema: VisionScannersPromptSuggestionsGenerateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof VisionScannersPromptSuggestionsGenerateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ReplayScannerPromptSuggestion>({
method: 'POST',
@@ -866,17 +927,19 @@ const visionScannersPromptSuggestionsGenerate = (): ToolBase<
},
})
-const VisionScannersScanSessionSchema = VisionScannersObserveCreateParams.omit({ project_id: true }).extend(
- VisionScannersObserveCreateBody.shape
-)
+const VisionScannersScanSessionSchema = () => {
+ const VisionScannersObserveCreateBody = orvalSchemas.VisionScannersObserveCreateBody()
+ const VisionScannersObserveCreateParams = orvalSchemas.VisionScannersObserveCreateParams()
+ return VisionScannersObserveCreateParams.omit({ project_id: true }).extend(VisionScannersObserveCreateBody.shape)
+}
const visionScannersScanSession = (): ToolBase<
- typeof VisionScannersScanSessionSchema,
+ ReturnType<typeof VisionScannersScanSessionSchema>,
Schemas.ObserveAlreadyScanned
> => ({
name: 'vision-scanners-scan-session',
- schema: VisionScannersScanSessionSchema,
- handler: async (context: Context, params: z.infer<typeof VisionScannersScanSessionSchema>) => {
+ schema: VisionScannersScanSessionSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionScannersScanSessionSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.session_id !== undefined) {
@@ -891,14 +954,16 @@ const visionScannersScanSession = (): ToolBase<
},
})
-const VisionScannersUpdateSchema = VisionScannersPartialUpdateParams.omit({ project_id: true }).extend(
- VisionScannersPartialUpdateBody.shape
-)
+const VisionScannersUpdateSchema = () => {
+ const VisionScannersPartialUpdateBody = orvalSchemas.VisionScannersPartialUpdateBody()
+ const VisionScannersPartialUpdateParams = orvalSchemas.VisionScannersPartialUpdateParams()
+ return VisionScannersPartialUpdateParams.omit({ project_id: true }).extend(VisionScannersPartialUpdateBody.shape)
+}
-const visionScannersUpdate = (): ToolBase<typeof VisionScannersUpdateSchema, Schemas.ReplayScanner> => ({
+const visionScannersUpdate = (): ToolBase<ReturnType<typeof VisionScannersUpdateSchema>, Schemas.ReplayScanner> => ({
name: 'vision-scanners-update',
- schema: VisionScannersUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof VisionScannersUpdateSchema>) => {
+ schema: VisionScannersUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisionScannersUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
diff --git a/services/mcp/src/tools/generated/review_hog.ts b/services/mcp/src/tools/generated/review_hog.ts
index 16e6605a9571..dc9809319312 100644
--- a/services/mcp/src/tools/generated/review_hog.ts
+++ b/services/mcp/src/tools/generated/review_hog.ts
@@ -2,20 +2,19 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- ReviewHogReviewsListQueryParams,
- ReviewHogReviewsRetrieveParams,
- ReviewHogReviewsTriggerCreateBody,
-} from '@/generated/review_hog/api'
+import * as orvalSchemas from '@/generated/review_hog/api'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const ReviewHogReviewsGetSchema = ReviewHogReviewsRetrieveParams.omit({ project_id: true })
+const ReviewHogReviewsGetSchema = () => {
+ const ReviewHogReviewsRetrieveParams = orvalSchemas.ReviewHogReviewsRetrieveParams()
+ return ReviewHogReviewsRetrieveParams.omit({ project_id: true })
+}
-const reviewHogReviewsGet = (): ToolBase<typeof ReviewHogReviewsGetSchema, Schemas.ReviewDetail> => ({
+const reviewHogReviewsGet = (): ToolBase<ReturnType<typeof ReviewHogReviewsGetSchema>, Schemas.ReviewDetail> => ({
name: 'review-hog-reviews-get',
- schema: ReviewHogReviewsGetSchema,
- handler: async (context: Context, params: z.infer<typeof ReviewHogReviewsGetSchema>) => {
+ schema: ReviewHogReviewsGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ReviewHogReviewsGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ReviewDetail>({
method: 'GET',
@@ -25,15 +24,18 @@ const reviewHogReviewsGet = (): ToolBase<typeof ReviewHogReviewsGetSchema, Schem
},
})
-const ReviewHogReviewsListSchema = ReviewHogReviewsListQueryParams
+const ReviewHogReviewsListSchema = () => {
+ const ReviewHogReviewsListQueryParams = orvalSchemas.ReviewHogReviewsListQueryParams()
+ return ReviewHogReviewsListQueryParams
+}
const reviewHogReviewsList = (): ToolBase<
- typeof ReviewHogReviewsListSchema,
+ ReturnType<typeof ReviewHogReviewsListSchema>,
WithPostHogUrl<Schemas.ReviewRecentReviewsPage>
> => ({
name: 'review-hog-reviews-list',
- schema: ReviewHogReviewsListSchema,
- handler: async (context: Context, params: z.infer<typeof ReviewHogReviewsListSchema>) => {
+ schema: ReviewHogReviewsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ReviewHogReviewsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ReviewRecentReviewsPage>({
method: 'GET',
@@ -47,12 +49,18 @@ const reviewHogReviewsList = (): ToolBase<
},
})
-const ReviewHogReviewsTriggerSchema = ReviewHogReviewsTriggerCreateBody
+const ReviewHogReviewsTriggerSchema = () => {
+ const ReviewHogReviewsTriggerCreateBody = orvalSchemas.ReviewHogReviewsTriggerCreateBody()
+ return ReviewHogReviewsTriggerCreateBody
+}
-const reviewHogReviewsTrigger = (): ToolBase<typeof ReviewHogReviewsTriggerSchema, Schemas.ReviewTriggerResponse> => ({
+const reviewHogReviewsTrigger = (): ToolBase<
+ ReturnType<typeof ReviewHogReviewsTriggerSchema>,
+ Schemas.ReviewTriggerResponse
+> => ({
name: 'review-hog-reviews-trigger',
- schema: ReviewHogReviewsTriggerSchema,
- handler: async (context: Context, params: z.infer<typeof ReviewHogReviewsTriggerSchema>) => {
+ schema: ReviewHogReviewsTriggerSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ReviewHogReviewsTriggerSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.pr_url !== undefined) {
diff --git a/services/mcp/src/tools/generated/signals.ts b/services/mcp/src/tools/generated/signals.ts
index e91f78cee262..34e60da6bae7 100644
--- a/services/mcp/src/tools/generated/signals.ts
+++ b/services/mcp/src/tools/generated/signals.ts
@@ -2,59 +2,7 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- SignalsReportArtefactsCreateBody,
- SignalsReportArtefactsCreateParams,
- SignalsReportArtefactsDestroyParams,
- SignalsReportArtefactsListParams,
- SignalsReportArtefactsListQueryParams,
- SignalsReportArtefactsPartialUpdateBody,
- SignalsReportArtefactsPartialUpdateParams,
- SignalsReportArtefactsRetrieveParams,
- SignalsReportsBulkStateCreateBody,
- SignalsReportsListQueryParams,
- SignalsReportsPartialUpdateBody,
- SignalsReportsPartialUpdateParams,
- SignalsReportsRetrieveParams,
- SignalsReportsStateCreateBody,
- SignalsReportsStateCreateParams,
- SignalsScoutConfigCreateBody,
- SignalsScoutConfigDestroyParams,
- SignalsScoutConfigListQueryParams,
- SignalsScoutConfigRunParams,
- SignalsScoutConfigSyncQueryParams,
- SignalsScoutConfigUpdateBody,
- SignalsScoutConfigUpdateParams,
- SignalsScoutCreateBody,
- SignalsScoutEditReportBody,
- SignalsScoutEditReportParams,
- SignalsScoutEmitReportBody,
- SignalsScoutEmitReportParams,
- SignalsScoutEmitSignalBody,
- SignalsScoutEmitSignalParams,
- SignalsScoutMembersListQueryParams,
- SignalsScoutNotesCreateBody,
- SignalsScoutNotesDestroyParams,
- SignalsScoutNotesListQueryParams,
- SignalsScoutProjectProfileGetQueryParams,
- SignalsScoutRecordOutputBody,
- SignalsScoutRecordOutputParams,
- SignalsScoutRunsEmissionReportsParams,
- SignalsScoutRunsEmissionsParams,
- SignalsScoutRunsListQueryParams,
- SignalsScoutRunsRecentEmissionsQueryParams,
- SignalsScoutRunsRetrieveParams,
- SignalsScoutScratchpadForgetBody,
- SignalsScoutScratchpadRememberBody,
- SignalsScoutScratchpadSearchQueryParams,
- SignalsSourceConfigsCreateBody,
- SignalsSourceConfigsListQueryParams,
- SignalsSourceConfigsPartialUpdateBody,
- SignalsSourceConfigsPartialUpdateParams,
- SignalsSourceConfigsRetrieveParams,
- SignalsSourceConfigsUpdateBody,
- SignalsSourceConfigsUpdateParams,
-} from '@/generated/signals/api'
+import * as orvalSchemas from '@/generated/signals/api'
import { normalizeParamAliases } from '@/tools/cast-helpers'
import { getConfirmedActionRuntime } from '@/tools/confirmed-action-registry'
import {
@@ -73,17 +21,19 @@ import {
} from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const InboxReportArtefactsCreateSchema = SignalsReportArtefactsCreateParams.omit({ project_id: true }).extend(
- SignalsReportArtefactsCreateBody.shape
-)
+const InboxReportArtefactsCreateSchema = () => {
+ const SignalsReportArtefactsCreateBody = orvalSchemas.SignalsReportArtefactsCreateBody()
+ const SignalsReportArtefactsCreateParams = orvalSchemas.SignalsReportArtefactsCreateParams()
+ return SignalsReportArtefactsCreateParams.omit({ project_id: true }).extend(SignalsReportArtefactsCreateBody.shape)
+}
const inboxReportArtefactsCreate = (): ToolBase<
- typeof InboxReportArtefactsCreateSchema,
+ ReturnType<typeof InboxReportArtefactsCreateSchema>,
WithPostHogUrl<Schemas.SignalReportArtefactWriteResponse>
> => ({
name: 'inbox-report-artefacts-create',
- schema: InboxReportArtefactsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof InboxReportArtefactsCreateSchema>) => {
+ schema: InboxReportArtefactsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InboxReportArtefactsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.artefact_type !== undefined) {
@@ -101,12 +51,15 @@ const inboxReportArtefactsCreate = (): ToolBase<
},
})
-const InboxReportArtefactsDeleteSchema = SignalsReportArtefactsDestroyParams.omit({ project_id: true })
+const InboxReportArtefactsDeleteSchema = () => {
+ const SignalsReportArtefactsDestroyParams = orvalSchemas.SignalsReportArtefactsDestroyParams()
+ return SignalsReportArtefactsDestroyParams.omit({ project_id: true })
+}
-const inboxReportArtefactsDelete = (): ToolBase<typeof InboxReportArtefactsDeleteSchema, unknown> => ({
+const inboxReportArtefactsDelete = (): ToolBase<ReturnType<typeof InboxReportArtefactsDeleteSchema>, unknown> => ({
name: 'inbox-report-artefacts-delete',
- schema: InboxReportArtefactsDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof InboxReportArtefactsDeleteSchema>) => {
+ schema: InboxReportArtefactsDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InboxReportArtefactsDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -116,17 +69,21 @@ const inboxReportArtefactsDelete = (): ToolBase<typeof InboxReportArtefactsDelet
},
})
-const InboxReportArtefactsListSchema = SignalsReportArtefactsListParams.omit({ project_id: true }).extend(
- SignalsReportArtefactsListQueryParams.shape
-)
+const InboxReportArtefactsListSchema = () => {
+ const SignalsReportArtefactsListParams = orvalSchemas.SignalsReportArtefactsListParams()
+ const SignalsReportArtefactsListQueryParams = orvalSchemas.SignalsReportArtefactsListQueryParams()
+ return SignalsReportArtefactsListParams.omit({ project_id: true }).extend(
+ SignalsReportArtefactsListQueryParams.shape
+ )
+}
const inboxReportArtefactsList = (): ToolBase<
- typeof InboxReportArtefactsListSchema,
+ ReturnType<typeof InboxReportArtefactsListSchema>,
WithPostHogUrl<Schemas.PaginatedSignalReportArtefactList>
> => ({
name: 'inbox-report-artefacts-list',
- schema: InboxReportArtefactsListSchema,
- handler: async (context: Context, params: z.infer<typeof InboxReportArtefactsListSchema>) => {
+ schema: InboxReportArtefactsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InboxReportArtefactsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedSignalReportArtefactList>({
method: 'GET',
@@ -140,15 +97,18 @@ const inboxReportArtefactsList = (): ToolBase<
},
})
-const InboxReportArtefactsRetrieveSchema = SignalsReportArtefactsRetrieveParams.omit({ project_id: true })
+const InboxReportArtefactsRetrieveSchema = () => {
+ const SignalsReportArtefactsRetrieveParams = orvalSchemas.SignalsReportArtefactsRetrieveParams()
+ return SignalsReportArtefactsRetrieveParams.omit({ project_id: true })
+}
const inboxReportArtefactsRetrieve = (): ToolBase<
- typeof InboxReportArtefactsRetrieveSchema,
+ ReturnType<typeof InboxReportArtefactsRetrieveSchema>,
WithPostHogUrl<Schemas.SignalReportArtefact>
> => ({
name: 'inbox-report-artefacts-retrieve',
- schema: InboxReportArtefactsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof InboxReportArtefactsRetrieveSchema>) => {
+ schema: InboxReportArtefactsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InboxReportArtefactsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SignalReportArtefact>({
method: 'GET',
@@ -158,17 +118,21 @@ const inboxReportArtefactsRetrieve = (): ToolBase<
},
})
-const InboxReportArtefactsUpdateSchema = SignalsReportArtefactsPartialUpdateParams.omit({ project_id: true }).extend(
- SignalsReportArtefactsPartialUpdateBody.shape
-)
+const InboxReportArtefactsUpdateSchema = () => {
+ const SignalsReportArtefactsPartialUpdateBody = orvalSchemas.SignalsReportArtefactsPartialUpdateBody()
+ const SignalsReportArtefactsPartialUpdateParams = orvalSchemas.SignalsReportArtefactsPartialUpdateParams()
+ return SignalsReportArtefactsPartialUpdateParams.omit({ project_id: true }).extend(
+ SignalsReportArtefactsPartialUpdateBody.shape
+ )
+}
const inboxReportArtefactsUpdate = (): ToolBase<
- typeof InboxReportArtefactsUpdateSchema,
+ ReturnType<typeof InboxReportArtefactsUpdateSchema>,
Schemas.SignalReportArtefactWriteResponse
> => ({
name: 'inbox-report-artefacts-update',
- schema: InboxReportArtefactsUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof InboxReportArtefactsUpdateSchema>) => {
+ schema: InboxReportArtefactsUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InboxReportArtefactsUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.content !== undefined) {
@@ -183,15 +147,18 @@ const inboxReportArtefactsUpdate = (): ToolBase<
},
})
-const InboxReportsBulkSetStateSchema = SignalsReportsBulkStateCreateBody
+const InboxReportsBulkSetStateSchema = () => {
+ const SignalsReportsBulkStateCreateBody = orvalSchemas.SignalsReportsBulkStateCreateBody()
+ return SignalsReportsBulkStateCreateBody
+}
const inboxReportsBulkSetState = (): ToolBase<
- typeof InboxReportsBulkSetStateSchema,
+ ReturnType<typeof InboxReportsBulkSetStateSchema>,
Schemas.SignalReportBulkStateResponse
> => ({
name: 'inbox-reports-bulk-set-state',
- schema: InboxReportsBulkSetStateSchema,
- handler: async (context: Context, params: z.infer<typeof InboxReportsBulkSetStateSchema>) => {
+ schema: InboxReportsBulkSetStateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InboxReportsBulkSetStateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.state !== undefined) {
@@ -221,15 +188,18 @@ const inboxReportsBulkSetState = (): ToolBase<
},
})
-const InboxReportsListSchema = SignalsReportsListQueryParams
+const InboxReportsListSchema = () => {
+ const SignalsReportsListQueryParams = orvalSchemas.SignalsReportsListQueryParams()
+ return SignalsReportsListQueryParams
+}
const inboxReportsList = (): ToolBase<
- typeof InboxReportsListSchema,
+ ReturnType<typeof InboxReportsListSchema>,
WithAgentNote<WithPostHogUrl<Schemas.PaginatedSignalReportList>>
> => ({
name: 'inbox-reports-list',
- schema: InboxReportsListSchema,
- handler: async (context: Context, params: z.infer<typeof InboxReportsListSchema>) => {
+ schema: InboxReportsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InboxReportsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedSignalReportList>({
method: 'GET',
@@ -292,18 +262,21 @@ const inboxReportsList = (): ToolBase<
},
})
-const InboxReportsRetrieveSchema = z.preprocess(
- normalizeParamAliases({ id: ['report_id'] }),
- SignalsReportsRetrieveParams.omit({ project_id: true })
-)
+const InboxReportsRetrieveSchema = () => {
+ const SignalsReportsRetrieveParams = orvalSchemas.SignalsReportsRetrieveParams()
+ return z.preprocess(
+ normalizeParamAliases({ id: ['report_id'] }),
+ SignalsReportsRetrieveParams.omit({ project_id: true })
+ )
+}
const inboxReportsRetrieve = (): ToolBase<
- typeof InboxReportsRetrieveSchema,
+ ReturnType<typeof InboxReportsRetrieveSchema>,
WithAgentNote<WithPostHogUrl<Schemas.SignalReport>>
> => ({
name: 'inbox-reports-retrieve',
- schema: InboxReportsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof InboxReportsRetrieveSchema>) => {
+ schema: InboxReportsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InboxReportsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SignalReport>({
method: 'GET',
@@ -316,14 +289,19 @@ const inboxReportsRetrieve = (): ToolBase<
},
})
-const InboxReportsSetStateSchema = SignalsReportsStateCreateParams.omit({ project_id: true }).extend(
- SignalsReportsStateCreateBody.shape
-)
+const InboxReportsSetStateSchema = () => {
+ const SignalsReportsStateCreateBody = orvalSchemas.SignalsReportsStateCreateBody()
+ const SignalsReportsStateCreateParams = orvalSchemas.SignalsReportsStateCreateParams()
+ return SignalsReportsStateCreateParams.omit({ project_id: true }).extend(SignalsReportsStateCreateBody.shape)
+}
-const inboxReportsSetState = (): ToolBase<typeof InboxReportsSetStateSchema, WithPostHogUrl<Schemas.SignalReport>> => ({
+const inboxReportsSetState = (): ToolBase<
+ ReturnType<typeof InboxReportsSetStateSchema>,
+ WithPostHogUrl<Schemas.SignalReport>
+> => ({
name: 'inbox-reports-set-state',
- schema: InboxReportsSetStateSchema,
- handler: async (context: Context, params: z.infer<typeof InboxReportsSetStateSchema>) => {
+ schema: InboxReportsSetStateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InboxReportsSetStateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.state !== undefined) {
@@ -350,14 +328,19 @@ const inboxReportsSetState = (): ToolBase<typeof InboxReportsSetStateSchema, Wit
},
})
-const InboxReportsUpdateSchema = SignalsReportsPartialUpdateParams.omit({ project_id: true }).extend(
- SignalsReportsPartialUpdateBody.shape
-)
+const InboxReportsUpdateSchema = () => {
+ const SignalsReportsPartialUpdateBody = orvalSchemas.SignalsReportsPartialUpdateBody()
+ const SignalsReportsPartialUpdateParams = orvalSchemas.SignalsReportsPartialUpdateParams()
+ return SignalsReportsPartialUpdateParams.omit({ project_id: true }).extend(SignalsReportsPartialUpdateBody.shape)
+}
-const inboxReportsUpdate = (): ToolBase<typeof InboxReportsUpdateSchema, WithPostHogUrl<Schemas.SignalReport>> => ({
+const inboxReportsUpdate = (): ToolBase<
+ ReturnType<typeof InboxReportsUpdateSchema>,
+ WithPostHogUrl<Schemas.SignalReport>
+> => ({
name: 'inbox-reports-update',
- schema: InboxReportsUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof InboxReportsUpdateSchema>) => {
+ schema: InboxReportsUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InboxReportsUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.title !== undefined) {
@@ -375,12 +358,18 @@ const inboxReportsUpdate = (): ToolBase<typeof InboxReportsUpdateSchema, WithPos
},
})
-const InboxSourceConfigsCreateSchema = SignalsSourceConfigsCreateBody
+const InboxSourceConfigsCreateSchema = () => {
+ const SignalsSourceConfigsCreateBody = orvalSchemas.SignalsSourceConfigsCreateBody()
+ return SignalsSourceConfigsCreateBody
+}
-const inboxSourceConfigsCreate = (): ToolBase<typeof InboxSourceConfigsCreateSchema, Schemas.SignalSourceConfig> => ({
+const inboxSourceConfigsCreate = (): ToolBase<
+ ReturnType<typeof InboxSourceConfigsCreateSchema>,
+ Schemas.SignalSourceConfig
+> => ({
name: 'inbox-source-configs-create',
- schema: InboxSourceConfigsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof InboxSourceConfigsCreateSchema>) => {
+ schema: InboxSourceConfigsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InboxSourceConfigsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.source_product !== undefined) {
@@ -404,15 +393,18 @@ const inboxSourceConfigsCreate = (): ToolBase<typeof InboxSourceConfigsCreateSch
},
})
-const InboxSourceConfigsListSchema = SignalsSourceConfigsListQueryParams
+const InboxSourceConfigsListSchema = () => {
+ const SignalsSourceConfigsListQueryParams = orvalSchemas.SignalsSourceConfigsListQueryParams()
+ return SignalsSourceConfigsListQueryParams
+}
const inboxSourceConfigsList = (): ToolBase<
- typeof InboxSourceConfigsListSchema,
+ ReturnType<typeof InboxSourceConfigsListSchema>,
WithPostHogUrl<Schemas.PaginatedSignalSourceConfigList>
> => ({
name: 'inbox-source-configs-list',
- schema: InboxSourceConfigsListSchema,
- handler: async (context: Context, params: z.infer<typeof InboxSourceConfigsListSchema>) => {
+ schema: InboxSourceConfigsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InboxSourceConfigsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedSignalSourceConfigList>({
method: 'GET',
@@ -440,17 +432,21 @@ const inboxSourceConfigsList = (): ToolBase<
},
})
-const InboxSourceConfigsPartialUpdateSchema = SignalsSourceConfigsPartialUpdateParams.omit({ project_id: true }).extend(
- SignalsSourceConfigsPartialUpdateBody.shape
-)
+const InboxSourceConfigsPartialUpdateSchema = () => {
+ const SignalsSourceConfigsPartialUpdateBody = orvalSchemas.SignalsSourceConfigsPartialUpdateBody()
+ const SignalsSourceConfigsPartialUpdateParams = orvalSchemas.SignalsSourceConfigsPartialUpdateParams()
+ return SignalsSourceConfigsPartialUpdateParams.omit({ project_id: true }).extend(
+ SignalsSourceConfigsPartialUpdateBody.shape
+ )
+}
const inboxSourceConfigsPartialUpdate = (): ToolBase<
- typeof InboxSourceConfigsPartialUpdateSchema,
+ ReturnType<typeof InboxSourceConfigsPartialUpdateSchema>,
Schemas.SignalSourceConfig
> => ({
name: 'inbox-source-configs-partial-update',
- schema: InboxSourceConfigsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof InboxSourceConfigsPartialUpdateSchema>) => {
+ schema: InboxSourceConfigsPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InboxSourceConfigsPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.source_product !== undefined) {
@@ -474,15 +470,18 @@ const inboxSourceConfigsPartialUpdate = (): ToolBase<
},
})
-const InboxSourceConfigsRetrieveSchema = SignalsSourceConfigsRetrieveParams.omit({ project_id: true })
+const InboxSourceConfigsRetrieveSchema = () => {
+ const SignalsSourceConfigsRetrieveParams = orvalSchemas.SignalsSourceConfigsRetrieveParams()
+ return SignalsSourceConfigsRetrieveParams.omit({ project_id: true })
+}
const inboxSourceConfigsRetrieve = (): ToolBase<
- typeof InboxSourceConfigsRetrieveSchema,
+ ReturnType<typeof InboxSourceConfigsRetrieveSchema>,
Schemas.SignalSourceConfig
> => ({
name: 'inbox-source-configs-retrieve',
- schema: InboxSourceConfigsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof InboxSourceConfigsRetrieveSchema>) => {
+ schema: InboxSourceConfigsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InboxSourceConfigsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SignalSourceConfig>({
method: 'GET',
@@ -492,14 +491,19 @@ const inboxSourceConfigsRetrieve = (): ToolBase<
},
})
-const InboxSourceConfigsUpdateSchema = SignalsSourceConfigsUpdateParams.omit({ project_id: true }).extend(
- SignalsSourceConfigsUpdateBody.shape
-)
+const InboxSourceConfigsUpdateSchema = () => {
+ const SignalsSourceConfigsUpdateBody = orvalSchemas.SignalsSourceConfigsUpdateBody()
+ const SignalsSourceConfigsUpdateParams = orvalSchemas.SignalsSourceConfigsUpdateParams()
+ return SignalsSourceConfigsUpdateParams.omit({ project_id: true }).extend(SignalsSourceConfigsUpdateBody.shape)
+}
-const inboxSourceConfigsUpdate = (): ToolBase<typeof InboxSourceConfigsUpdateSchema, Schemas.SignalSourceConfig> => ({
+const inboxSourceConfigsUpdate = (): ToolBase<
+ ReturnType<typeof InboxSourceConfigsUpdateSchema>,
+ Schemas.SignalSourceConfig
+> => ({
name: 'inbox-source-configs-update',
- schema: InboxSourceConfigsUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof InboxSourceConfigsUpdateSchema>) => {
+ schema: InboxSourceConfigsUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof InboxSourceConfigsUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.source_product !== undefined) {
@@ -523,12 +527,15 @@ const inboxSourceConfigsUpdate = (): ToolBase<typeof InboxSourceConfigsUpdateSch
},
})
-const ScoutConfigCreateSchema = SignalsScoutConfigCreateBody
+const ScoutConfigCreateSchema = () => {
+ const SignalsScoutConfigCreateBody = orvalSchemas.SignalsScoutConfigCreateBody()
+ return SignalsScoutConfigCreateBody
+}
-const scoutConfigCreate = (): ToolBase<typeof ScoutConfigCreateSchema, Schemas.SignalScoutConfig> => ({
+const scoutConfigCreate = (): ToolBase<ReturnType<typeof ScoutConfigCreateSchema>, Schemas.SignalScoutConfig> => ({
name: 'scout-config-create',
- schema: ScoutConfigCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutConfigCreateSchema>) => {
+ schema: ScoutConfigCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutConfigCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.enabled !== undefined) {
@@ -576,12 +583,15 @@ const scoutConfigCreate = (): ToolBase<typeof ScoutConfigCreateSchema, Schemas.S
},
})
-const ScoutConfigDeleteSchema = SignalsScoutConfigDestroyParams.omit({ project_id: true })
+const ScoutConfigDeleteSchema = () => {
+ const SignalsScoutConfigDestroyParams = orvalSchemas.SignalsScoutConfigDestroyParams()
+ return SignalsScoutConfigDestroyParams.omit({ project_id: true })
+}
-const scoutConfigDelete = (): ToolBase<typeof ScoutConfigDeleteSchema, unknown> => ({
+const scoutConfigDelete = (): ToolBase<ReturnType<typeof ScoutConfigDeleteSchema>, unknown> => ({
name: 'scout-config-delete',
- schema: ScoutConfigDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutConfigDeleteSchema>) => {
+ schema: ScoutConfigDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutConfigDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -591,12 +601,18 @@ const scoutConfigDelete = (): ToolBase<typeof ScoutConfigDeleteSchema, unknown>
},
})
-const ScoutConfigListSchema = SignalsScoutConfigListQueryParams
+const ScoutConfigListSchema = () => {
+ const SignalsScoutConfigListQueryParams = orvalSchemas.SignalsScoutConfigListQueryParams()
+ return SignalsScoutConfigListQueryParams
+}
-const scoutConfigList = (): ToolBase<typeof ScoutConfigListSchema, WithPostHogUrl<Schemas.SignalScoutConfig[]>> => ({
+const scoutConfigList = (): ToolBase<
+ ReturnType<typeof ScoutConfigListSchema>,
+ WithPostHogUrl<Schemas.SignalScoutConfig[]>
+> => ({
name: 'scout-config-list',
- schema: ScoutConfigListSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutConfigListSchema>) => {
+ schema: ScoutConfigListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutConfigListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SignalScoutConfig[]>({
method: 'GET',
@@ -609,12 +625,18 @@ const scoutConfigList = (): ToolBase<typeof ScoutConfigListSchema, WithPostHogUr
},
})
-const ScoutConfigSyncSchema = SignalsScoutConfigSyncQueryParams
+const ScoutConfigSyncSchema = () => {
+ const SignalsScoutConfigSyncQueryParams = orvalSchemas.SignalsScoutConfigSyncQueryParams()
+ return SignalsScoutConfigSyncQueryParams
+}
-const scoutConfigSync = (): ToolBase<typeof ScoutConfigSyncSchema, WithPostHogUrl<Schemas.SignalScoutConfig[]>> => ({
+const scoutConfigSync = (): ToolBase<
+ ReturnType<typeof ScoutConfigSyncSchema>,
+ WithPostHogUrl<Schemas.SignalScoutConfig[]>
+> => ({
name: 'scout-config-sync',
- schema: ScoutConfigSyncSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutConfigSyncSchema>) => {
+ schema: ScoutConfigSyncSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutConfigSyncSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SignalScoutConfig[]>({
method: 'POST',
@@ -627,14 +649,19 @@ const scoutConfigSync = (): ToolBase<typeof ScoutConfigSyncSchema, WithPostHogUr
},
})
-const ScoutConfigUpdateSchema = SignalsScoutConfigUpdateParams.omit({ project_id: true }).extend(
- SignalsScoutConfigUpdateBody.shape
-)
+const ScoutConfigUpdateSchema = () => {
+ const SignalsScoutConfigUpdateBody = orvalSchemas.SignalsScoutConfigUpdateBody()
+ const SignalsScoutConfigUpdateParams = orvalSchemas.SignalsScoutConfigUpdateParams()
+ return SignalsScoutConfigUpdateParams.omit({ project_id: true }).extend(SignalsScoutConfigUpdateBody.shape)
+}
-const scoutConfigUpdate = (): ToolBase<typeof ScoutConfigUpdateSchema, WithPostHogUrl<Schemas.SignalScoutConfig>> => ({
+const scoutConfigUpdate = (): ToolBase<
+ ReturnType<typeof ScoutConfigUpdateSchema>,
+ WithPostHogUrl<Schemas.SignalScoutConfig>
+> => ({
name: 'scout-config-update',
- schema: ScoutConfigUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutConfigUpdateSchema>) => {
+ schema: ScoutConfigUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutConfigUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.enabled !== undefined) {
@@ -679,7 +706,10 @@ const scoutConfigUpdate = (): ToolBase<typeof ScoutConfigUpdateSchema, WithPostH
},
})
-const ScoutCreateSchema = SignalsScoutCreateBody
+const ScoutCreateSchema = () => {
+ const SignalsScoutCreateBody = orvalSchemas.SignalsScoutCreateBody()
+ return SignalsScoutCreateBody
+}
const ScoutCreateSchemaExecute = z.strictObject({
confirmation_hash: z
@@ -688,10 +718,10 @@ const ScoutCreateSchemaExecute = z.strictObject({
confirmation: z.string().describe('The literal string "confirm", typed by the user in chat. Required to proceed.'),
})
-const scoutCreatePrepare = (): ToolBase<typeof ScoutCreateSchema, PrepareConfirmedActionResult> => ({
+const scoutCreatePrepare = (): ToolBase<ReturnType<typeof ScoutCreateSchema>, PrepareConfirmedActionResult> => ({
name: 'scout-create-prepare',
- schema: ScoutCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutCreateSchema>) => {
+ schema: ScoutCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutCreateSchema>>) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
return await prepareConfirmedAction(context, {
@@ -713,7 +743,7 @@ const scoutCreateExecute = (): ToolBase<typeof ScoutCreateSchemaExecute, Schemas
handler: async (context: Context, confirmationParams: z.infer<typeof ScoutCreateSchemaExecute>) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
- const __guard = await executeConfirmedAction<z.infer<typeof ScoutCreateSchema>>(context, {
+ const __guard = await executeConfirmedAction<z.infer<ReturnType<typeof ScoutCreateSchema>>>(context, {
incomingArgs: confirmationParams,
purpose: 'scout-create',
codec: __runtime.codec,
@@ -751,14 +781,16 @@ const scoutCreateExecute = (): ToolBase<typeof ScoutCreateSchemaExecute, Schemas
},
})
-const ScoutEditReportSchema = SignalsScoutEditReportParams.omit({ project_id: true }).extend(
- SignalsScoutEditReportBody.shape
-)
+const ScoutEditReportSchema = () => {
+ const SignalsScoutEditReportBody = orvalSchemas.SignalsScoutEditReportBody()
+ const SignalsScoutEditReportParams = orvalSchemas.SignalsScoutEditReportParams()
+ return SignalsScoutEditReportParams.omit({ project_id: true }).extend(SignalsScoutEditReportBody.shape)
+}
-const scoutEditReport = (): ToolBase<typeof ScoutEditReportSchema, Schemas.EditReportResponse> => ({
+const scoutEditReport = (): ToolBase<ReturnType<typeof ScoutEditReportSchema>, Schemas.EditReportResponse> => ({
name: 'scout-edit-report',
- schema: ScoutEditReportSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutEditReportSchema>) => {
+ schema: ScoutEditReportSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutEditReportSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.report_id !== undefined) {
@@ -791,14 +823,16 @@ const scoutEditReport = (): ToolBase<typeof ScoutEditReportSchema, Schemas.EditR
},
})
-const ScoutEmitReportSchema = SignalsScoutEmitReportParams.omit({ project_id: true }).extend(
- SignalsScoutEmitReportBody.shape
-)
+const ScoutEmitReportSchema = () => {
+ const SignalsScoutEmitReportBody = orvalSchemas.SignalsScoutEmitReportBody()
+ const SignalsScoutEmitReportParams = orvalSchemas.SignalsScoutEmitReportParams()
+ return SignalsScoutEmitReportParams.omit({ project_id: true }).extend(SignalsScoutEmitReportBody.shape)
+}
-const scoutEmitReport = (): ToolBase<typeof ScoutEmitReportSchema, Schemas.EmitReportResponse> => ({
+const scoutEmitReport = (): ToolBase<ReturnType<typeof ScoutEmitReportSchema>, Schemas.EmitReportResponse> => ({
name: 'scout-emit-report',
- schema: ScoutEmitReportSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutEmitReportSchema>) => {
+ schema: ScoutEmitReportSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutEmitReportSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.title !== undefined) {
@@ -846,14 +880,16 @@ const scoutEmitReport = (): ToolBase<typeof ScoutEmitReportSchema, Schemas.EmitR
},
})
-const ScoutEmitSignalSchema = SignalsScoutEmitSignalParams.omit({ project_id: true }).extend(
- SignalsScoutEmitSignalBody.shape
-)
+const ScoutEmitSignalSchema = () => {
+ const SignalsScoutEmitSignalBody = orvalSchemas.SignalsScoutEmitSignalBody()
+ const SignalsScoutEmitSignalParams = orvalSchemas.SignalsScoutEmitSignalParams()
+ return SignalsScoutEmitSignalParams.omit({ project_id: true }).extend(SignalsScoutEmitSignalBody.shape)
+}
-const scoutEmitSignal = (): ToolBase<typeof ScoutEmitSignalSchema, Schemas.EmitFindingResponse> => ({
+const scoutEmitSignal = (): ToolBase<ReturnType<typeof ScoutEmitSignalSchema>, Schemas.EmitFindingResponse> => ({
name: 'scout-emit-signal',
- schema: ScoutEmitSignalSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutEmitSignalSchema>) => {
+ schema: ScoutEmitSignalSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutEmitSignalSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.description !== undefined) {
@@ -895,12 +931,18 @@ const scoutEmitSignal = (): ToolBase<typeof ScoutEmitSignalSchema, Schemas.EmitF
},
})
-const ScoutMembersListSchema = SignalsScoutMembersListQueryParams
+const ScoutMembersListSchema = () => {
+ const SignalsScoutMembersListQueryParams = orvalSchemas.SignalsScoutMembersListQueryParams()
+ return SignalsScoutMembersListQueryParams
+}
-const scoutMembersList = (): ToolBase<typeof ScoutMembersListSchema, WithPostHogUrl<Schemas.ScoutMember[]>> => ({
+const scoutMembersList = (): ToolBase<
+ ReturnType<typeof ScoutMembersListSchema>,
+ WithPostHogUrl<Schemas.ScoutMember[]>
+> => ({
name: 'scout-members-list',
- schema: ScoutMembersListSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutMembersListSchema>) => {
+ schema: ScoutMembersListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutMembersListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ScoutMember[]>({
method: 'GET',
@@ -913,13 +955,12 @@ const scoutMembersList = (): ToolBase<typeof ScoutMembersListSchema, WithPostHog
},
})
-const ScoutMetadataGetSchema = z.object({})
+const ScoutMetadataGetSchema = () => z.object({})
-const scoutMetadataGet = (): ToolBase<typeof ScoutMetadataGetSchema, Schemas.ScoutMetadata> => ({
+const scoutMetadataGet = (): ToolBase<ReturnType<typeof ScoutMetadataGetSchema>, Schemas.ScoutMetadata> => ({
name: 'scout-metadata-get',
- schema: ScoutMetadataGetSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof ScoutMetadataGetSchema>) => {
+ schema: ScoutMetadataGetSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof ScoutMetadataGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ScoutMetadata>({
method: 'GET',
@@ -929,12 +970,15 @@ const scoutMetadataGet = (): ToolBase<typeof ScoutMetadataGetSchema, Schemas.Sco
},
})
-const ScoutNotesCreateSchema = SignalsScoutNotesCreateBody
+const ScoutNotesCreateSchema = () => {
+ const SignalsScoutNotesCreateBody = orvalSchemas.SignalsScoutNotesCreateBody()
+ return SignalsScoutNotesCreateBody
+}
-const scoutNotesCreate = (): ToolBase<typeof ScoutNotesCreateSchema, Schemas.ScoutNote> => ({
+const scoutNotesCreate = (): ToolBase<ReturnType<typeof ScoutNotesCreateSchema>, Schemas.ScoutNote> => ({
name: 'scout-notes-create',
- schema: ScoutNotesCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutNotesCreateSchema>) => {
+ schema: ScoutNotesCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutNotesCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.content !== undefined) {
@@ -955,12 +999,15 @@ const scoutNotesCreate = (): ToolBase<typeof ScoutNotesCreateSchema, Schemas.Sco
},
})
-const ScoutNotesDeleteSchema = SignalsScoutNotesDestroyParams.omit({ project_id: true })
+const ScoutNotesDeleteSchema = () => {
+ const SignalsScoutNotesDestroyParams = orvalSchemas.SignalsScoutNotesDestroyParams()
+ return SignalsScoutNotesDestroyParams.omit({ project_id: true })
+}
-const scoutNotesDelete = (): ToolBase<typeof ScoutNotesDeleteSchema, unknown> => ({
+const scoutNotesDelete = (): ToolBase<ReturnType<typeof ScoutNotesDeleteSchema>, unknown> => ({
name: 'scout-notes-delete',
- schema: ScoutNotesDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutNotesDeleteSchema>) => {
+ schema: ScoutNotesDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutNotesDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -970,15 +1017,18 @@ const scoutNotesDelete = (): ToolBase<typeof ScoutNotesDeleteSchema, unknown> =>
},
})
-const ScoutNotesListSchema = SignalsScoutNotesListQueryParams
+const ScoutNotesListSchema = () => {
+ const SignalsScoutNotesListQueryParams = orvalSchemas.SignalsScoutNotesListQueryParams()
+ return SignalsScoutNotesListQueryParams
+}
const scoutNotesList = (): ToolBase<
- typeof ScoutNotesListSchema,
+ ReturnType<typeof ScoutNotesListSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.ScoutNote[]>>
> => ({
name: 'scout-notes-list',
- schema: ScoutNotesListSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutNotesListSchema>) => {
+ schema: ScoutNotesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutNotesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ScoutNote[]>({
method: 'GET',
@@ -1001,12 +1051,18 @@ const scoutNotesList = (): ToolBase<
},
})
-const ScoutProjectProfileGetSchema = SignalsScoutProjectProfileGetQueryParams
+const ScoutProjectProfileGetSchema = () => {
+ const SignalsScoutProjectProfileGetQueryParams = orvalSchemas.SignalsScoutProjectProfileGetQueryParams()
+ return SignalsScoutProjectProfileGetQueryParams
+}
-const scoutProjectProfileGet = (): ToolBase<typeof ScoutProjectProfileGetSchema, Schemas.ProjectProfile> => ({
+const scoutProjectProfileGet = (): ToolBase<
+ ReturnType<typeof ScoutProjectProfileGetSchema>,
+ Schemas.ProjectProfile
+> => ({
name: 'scout-project-profile-get',
- schema: ScoutProjectProfileGetSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutProjectProfileGetSchema>) => {
+ schema: ScoutProjectProfileGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutProjectProfileGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ProjectProfile>({
method: 'GET',
@@ -1019,14 +1075,19 @@ const scoutProjectProfileGet = (): ToolBase<typeof ScoutProjectProfileGetSchema,
},
})
-const ScoutRecordOutputSchema = SignalsScoutRecordOutputParams.omit({ project_id: true }).extend(
- SignalsScoutRecordOutputBody.shape
-)
+const ScoutRecordOutputSchema = () => {
+ const SignalsScoutRecordOutputBody = orvalSchemas.SignalsScoutRecordOutputBody()
+ const SignalsScoutRecordOutputParams = orvalSchemas.SignalsScoutRecordOutputParams()
+ return SignalsScoutRecordOutputParams.omit({ project_id: true }).extend(SignalsScoutRecordOutputBody.shape)
+}
-const scoutRecordOutput = (): ToolBase<typeof ScoutRecordOutputSchema, Schemas.RecordStructuredOutputResponse> => ({
+const scoutRecordOutput = (): ToolBase<
+ ReturnType<typeof ScoutRecordOutputSchema>,
+ Schemas.RecordStructuredOutputResponse
+> => ({
name: 'scout-record-output',
- schema: ScoutRecordOutputSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutRecordOutputSchema>) => {
+ schema: ScoutRecordOutputSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutRecordOutputSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.records !== undefined) {
@@ -1041,12 +1102,15 @@ const scoutRecordOutput = (): ToolBase<typeof ScoutRecordOutputSchema, Schemas.R
},
})
-const ScoutRunNowSchema = SignalsScoutConfigRunParams.omit({ project_id: true })
+const ScoutRunNowSchema = () => {
+ const SignalsScoutConfigRunParams = orvalSchemas.SignalsScoutConfigRunParams()
+ return SignalsScoutConfigRunParams.omit({ project_id: true })
+}
-const scoutRunNow = (): ToolBase<typeof ScoutRunNowSchema, unknown> => ({
+const scoutRunNow = (): ToolBase<ReturnType<typeof ScoutRunNowSchema>, unknown> => ({
name: 'scout-run-now',
- schema: ScoutRunNowSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutRunNowSchema>) => {
+ schema: ScoutRunNowSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutRunNowSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'POST',
@@ -1056,15 +1120,18 @@ const scoutRunNow = (): ToolBase<typeof ScoutRunNowSchema, unknown> => ({
},
})
-const ScoutRunsEmissionReportsSchema = SignalsScoutRunsEmissionReportsParams.omit({ project_id: true })
+const ScoutRunsEmissionReportsSchema = () => {
+ const SignalsScoutRunsEmissionReportsParams = orvalSchemas.SignalsScoutRunsEmissionReportsParams()
+ return SignalsScoutRunsEmissionReportsParams.omit({ project_id: true })
+}
const scoutRunsEmissionReports = (): ToolBase<
- typeof ScoutRunsEmissionReportsSchema,
+ ReturnType<typeof ScoutRunsEmissionReportsSchema>,
WithPostHogUrl<Schemas.ScoutEmissionReportLink[]>
> => ({
name: 'scout-runs-emission-reports',
- schema: ScoutRunsEmissionReportsSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutRunsEmissionReportsSchema>) => {
+ schema: ScoutRunsEmissionReportsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutRunsEmissionReportsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ScoutEmissionReportLink[]>({
method: 'GET',
@@ -1074,15 +1141,18 @@ const scoutRunsEmissionReports = (): ToolBase<
},
})
-const ScoutRunsEmissionsListSchema = SignalsScoutRunsEmissionsParams.omit({ project_id: true })
+const ScoutRunsEmissionsListSchema = () => {
+ const SignalsScoutRunsEmissionsParams = orvalSchemas.SignalsScoutRunsEmissionsParams()
+ return SignalsScoutRunsEmissionsParams.omit({ project_id: true })
+}
const scoutRunsEmissionsList = (): ToolBase<
- typeof ScoutRunsEmissionsListSchema,
+ ReturnType<typeof ScoutRunsEmissionsListSchema>,
WithPostHogUrl<Schemas.SignalScoutEmission[]>
> => ({
name: 'scout-runs-emissions-list',
- schema: ScoutRunsEmissionsListSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutRunsEmissionsListSchema>) => {
+ schema: ScoutRunsEmissionsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutRunsEmissionsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SignalScoutEmission[]>({
method: 'GET',
@@ -1092,12 +1162,18 @@ const scoutRunsEmissionsList = (): ToolBase<
},
})
-const ScoutRunsListSchema = SignalsScoutRunsListQueryParams
+const ScoutRunsListSchema = () => {
+ const SignalsScoutRunsListQueryParams = orvalSchemas.SignalsScoutRunsListQueryParams()
+ return SignalsScoutRunsListQueryParams
+}
-const scoutRunsList = (): ToolBase<typeof ScoutRunsListSchema, WithPostHogUrl<Schemas.SignalScoutRunSummary[]>> => ({
+const scoutRunsList = (): ToolBase<
+ ReturnType<typeof ScoutRunsListSchema>,
+ WithPostHogUrl<Schemas.SignalScoutRunSummary[]>
+> => ({
name: 'scout-runs-list',
- schema: ScoutRunsListSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutRunsListSchema>) => {
+ schema: ScoutRunsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutRunsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SignalScoutRunSummary[]>({
method: 'GET',
@@ -1116,15 +1192,18 @@ const scoutRunsList = (): ToolBase<typeof ScoutRunsListSchema, WithPostHogUrl<Sc
},
})
-const ScoutRunsRecentEmissionsSchema = SignalsScoutRunsRecentEmissionsQueryParams
+const ScoutRunsRecentEmissionsSchema = () => {
+ const SignalsScoutRunsRecentEmissionsQueryParams = orvalSchemas.SignalsScoutRunsRecentEmissionsQueryParams()
+ return SignalsScoutRunsRecentEmissionsQueryParams
+}
const scoutRunsRecentEmissions = (): ToolBase<
- typeof ScoutRunsRecentEmissionsSchema,
+ ReturnType<typeof ScoutRunsRecentEmissionsSchema>,
WithPostHogUrl<Schemas.SignalScoutEmission[]>
> => ({
name: 'scout-runs-recent-emissions',
- schema: ScoutRunsRecentEmissionsSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutRunsRecentEmissionsSchema>) => {
+ schema: ScoutRunsRecentEmissionsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutRunsRecentEmissionsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SignalScoutEmission[]>({
method: 'GET',
@@ -1140,12 +1219,15 @@ const scoutRunsRecentEmissions = (): ToolBase<
},
})
-const ScoutRunsRetrieveSchema = SignalsScoutRunsRetrieveParams.omit({ project_id: true })
+const ScoutRunsRetrieveSchema = () => {
+ const SignalsScoutRunsRetrieveParams = orvalSchemas.SignalsScoutRunsRetrieveParams()
+ return SignalsScoutRunsRetrieveParams.omit({ project_id: true })
+}
-const scoutRunsRetrieve = (): ToolBase<typeof ScoutRunsRetrieveSchema, Schemas.SignalScoutRunDetail> => ({
+const scoutRunsRetrieve = (): ToolBase<ReturnType<typeof ScoutRunsRetrieveSchema>, Schemas.SignalScoutRunDetail> => ({
name: 'scout-runs-retrieve',
- schema: ScoutRunsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutRunsRetrieveSchema>) => {
+ schema: ScoutRunsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutRunsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SignalScoutRunDetail>({
method: 'GET',
@@ -1155,12 +1237,15 @@ const scoutRunsRetrieve = (): ToolBase<typeof ScoutRunsRetrieveSchema, Schemas.S
},
})
-const ScoutScratchpadForgetSchema = SignalsScoutScratchpadForgetBody
+const ScoutScratchpadForgetSchema = () => {
+ const SignalsScoutScratchpadForgetBody = orvalSchemas.SignalsScoutScratchpadForgetBody()
+ return SignalsScoutScratchpadForgetBody
+}
-const scoutScratchpadForget = (): ToolBase<typeof ScoutScratchpadForgetSchema, Schemas.ForgetResponse> => ({
+const scoutScratchpadForget = (): ToolBase<ReturnType<typeof ScoutScratchpadForgetSchema>, Schemas.ForgetResponse> => ({
name: 'scout-scratchpad-forget',
- schema: ScoutScratchpadForgetSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutScratchpadForgetSchema>) => {
+ schema: ScoutScratchpadForgetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutScratchpadForgetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.key !== undefined) {
@@ -1175,12 +1260,18 @@ const scoutScratchpadForget = (): ToolBase<typeof ScoutScratchpadForgetSchema, S
},
})
-const ScoutScratchpadRememberSchema = SignalsScoutScratchpadRememberBody
+const ScoutScratchpadRememberSchema = () => {
+ const SignalsScoutScratchpadRememberBody = orvalSchemas.SignalsScoutScratchpadRememberBody()
+ return SignalsScoutScratchpadRememberBody
+}
-const scoutScratchpadRemember = (): ToolBase<typeof ScoutScratchpadRememberSchema, Schemas.ScratchpadEntry> => ({
+const scoutScratchpadRemember = (): ToolBase<
+ ReturnType<typeof ScoutScratchpadRememberSchema>,
+ Schemas.ScratchpadEntry
+> => ({
name: 'scout-scratchpad-remember',
- schema: ScoutScratchpadRememberSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutScratchpadRememberSchema>) => {
+ schema: ScoutScratchpadRememberSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutScratchpadRememberSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.key !== undefined) {
@@ -1204,15 +1295,18 @@ const scoutScratchpadRemember = (): ToolBase<typeof ScoutScratchpadRememberSchem
},
})
-const ScoutScratchpadSearchSchema = SignalsScoutScratchpadSearchQueryParams
+const ScoutScratchpadSearchSchema = () => {
+ const SignalsScoutScratchpadSearchQueryParams = orvalSchemas.SignalsScoutScratchpadSearchQueryParams()
+ return SignalsScoutScratchpadSearchQueryParams
+}
const scoutScratchpadSearch = (): ToolBase<
- typeof ScoutScratchpadSearchSchema,
+ ReturnType<typeof ScoutScratchpadSearchSchema>,
WithPostHogUrl<Schemas.ScratchpadEntry[]>
> => ({
name: 'scout-scratchpad-search',
- schema: ScoutScratchpadSearchSchema,
- handler: async (context: Context, params: z.infer<typeof ScoutScratchpadSearchSchema>) => {
+ schema: ScoutScratchpadSearchSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ScoutScratchpadSearchSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ScratchpadEntry[]>({
method: 'GET',
@@ -1232,12 +1326,18 @@ const scoutScratchpadSearch = (): ToolBase<
},
})
-const SignalsScoutConfigCreateSchema = SignalsScoutConfigCreateBody
+const SignalsScoutConfigCreateSchema = () => {
+ const SignalsScoutConfigCreateBody = orvalSchemas.SignalsScoutConfigCreateBody()
+ return SignalsScoutConfigCreateBody
+}
-const signalsScoutConfigCreate = (): ToolBase<typeof SignalsScoutConfigCreateSchema, Schemas.SignalScoutConfig> => ({
+const signalsScoutConfigCreate = (): ToolBase<
+ ReturnType<typeof SignalsScoutConfigCreateSchema>,
+ Schemas.SignalScoutConfig
+> => ({
name: 'signals-scout-config-create',
- schema: SignalsScoutConfigCreateSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutConfigCreateSchema>) => {
+ schema: SignalsScoutConfigCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutConfigCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.enabled !== undefined) {
@@ -1285,12 +1385,15 @@ const signalsScoutConfigCreate = (): ToolBase<typeof SignalsScoutConfigCreateSch
},
})
-const SignalsScoutConfigDeleteSchema = SignalsScoutConfigDestroyParams.omit({ project_id: true })
+const SignalsScoutConfigDeleteSchema = () => {
+ const SignalsScoutConfigDestroyParams = orvalSchemas.SignalsScoutConfigDestroyParams()
+ return SignalsScoutConfigDestroyParams.omit({ project_id: true })
+}
-const signalsScoutConfigDelete = (): ToolBase<typeof SignalsScoutConfigDeleteSchema, unknown> => ({
+const signalsScoutConfigDelete = (): ToolBase<ReturnType<typeof SignalsScoutConfigDeleteSchema>, unknown> => ({
name: 'signals-scout-config-delete',
- schema: SignalsScoutConfigDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutConfigDeleteSchema>) => {
+ schema: SignalsScoutConfigDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutConfigDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -1300,15 +1403,18 @@ const signalsScoutConfigDelete = (): ToolBase<typeof SignalsScoutConfigDeleteSch
},
})
-const SignalsScoutConfigListSchema = SignalsScoutConfigListQueryParams
+const SignalsScoutConfigListSchema = () => {
+ const SignalsScoutConfigListQueryParams = orvalSchemas.SignalsScoutConfigListQueryParams()
+ return SignalsScoutConfigListQueryParams
+}
const signalsScoutConfigList = (): ToolBase<
- typeof SignalsScoutConfigListSchema,
+ ReturnType<typeof SignalsScoutConfigListSchema>,
WithPostHogUrl<Schemas.SignalScoutConfig[]>
> => ({
name: 'signals-scout-config-list',
- schema: SignalsScoutConfigListSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutConfigListSchema>) => {
+ schema: SignalsScoutConfigListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutConfigListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SignalScoutConfig[]>({
method: 'GET',
@@ -1321,15 +1427,18 @@ const signalsScoutConfigList = (): ToolBase<
},
})
-const SignalsScoutConfigSyncSchema = SignalsScoutConfigSyncQueryParams
+const SignalsScoutConfigSyncSchema = () => {
+ const SignalsScoutConfigSyncQueryParams = orvalSchemas.SignalsScoutConfigSyncQueryParams()
+ return SignalsScoutConfigSyncQueryParams
+}
const signalsScoutConfigSync = (): ToolBase<
- typeof SignalsScoutConfigSyncSchema,
+ ReturnType<typeof SignalsScoutConfigSyncSchema>,
WithPostHogUrl<Schemas.SignalScoutConfig[]>
> => ({
name: 'signals-scout-config-sync',
- schema: SignalsScoutConfigSyncSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutConfigSyncSchema>) => {
+ schema: SignalsScoutConfigSyncSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutConfigSyncSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SignalScoutConfig[]>({
method: 'POST',
@@ -1342,17 +1451,19 @@ const signalsScoutConfigSync = (): ToolBase<
},
})
-const SignalsScoutConfigUpdateSchema = SignalsScoutConfigUpdateParams.omit({ project_id: true }).extend(
- SignalsScoutConfigUpdateBody.shape
-)
+const SignalsScoutConfigUpdateSchema = () => {
+ const SignalsScoutConfigUpdateBody = orvalSchemas.SignalsScoutConfigUpdateBody()
+ const SignalsScoutConfigUpdateParams = orvalSchemas.SignalsScoutConfigUpdateParams()
+ return SignalsScoutConfigUpdateParams.omit({ project_id: true }).extend(SignalsScoutConfigUpdateBody.shape)
+}
const signalsScoutConfigUpdate = (): ToolBase<
- typeof SignalsScoutConfigUpdateSchema,
+ ReturnType<typeof SignalsScoutConfigUpdateSchema>,
WithPostHogUrl<Schemas.SignalScoutConfig>
> => ({
name: 'signals-scout-config-update',
- schema: SignalsScoutConfigUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutConfigUpdateSchema>) => {
+ schema: SignalsScoutConfigUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutConfigUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.enabled !== undefined) {
@@ -1397,14 +1508,19 @@ const signalsScoutConfigUpdate = (): ToolBase<
},
})
-const SignalsScoutEditReportSchema = SignalsScoutEditReportParams.omit({ project_id: true }).extend(
- SignalsScoutEditReportBody.shape
-)
+const SignalsScoutEditReportSchema = () => {
+ const SignalsScoutEditReportBody = orvalSchemas.SignalsScoutEditReportBody()
+ const SignalsScoutEditReportParams = orvalSchemas.SignalsScoutEditReportParams()
+ return SignalsScoutEditReportParams.omit({ project_id: true }).extend(SignalsScoutEditReportBody.shape)
+}
-const signalsScoutEditReport = (): ToolBase<typeof SignalsScoutEditReportSchema, Schemas.EditReportResponse> => ({
+const signalsScoutEditReport = (): ToolBase<
+ ReturnType<typeof SignalsScoutEditReportSchema>,
+ Schemas.EditReportResponse
+> => ({
name: 'signals-scout-edit-report',
- schema: SignalsScoutEditReportSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutEditReportSchema>) => {
+ schema: SignalsScoutEditReportSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutEditReportSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.report_id !== undefined) {
@@ -1437,14 +1553,19 @@ const signalsScoutEditReport = (): ToolBase<typeof SignalsScoutEditReportSchema,
},
})
-const SignalsScoutEmitReportSchema = SignalsScoutEmitReportParams.omit({ project_id: true }).extend(
- SignalsScoutEmitReportBody.shape
-)
+const SignalsScoutEmitReportSchema = () => {
+ const SignalsScoutEmitReportBody = orvalSchemas.SignalsScoutEmitReportBody()
+ const SignalsScoutEmitReportParams = orvalSchemas.SignalsScoutEmitReportParams()
+ return SignalsScoutEmitReportParams.omit({ project_id: true }).extend(SignalsScoutEmitReportBody.shape)
+}
-const signalsScoutEmitReport = (): ToolBase<typeof SignalsScoutEmitReportSchema, Schemas.EmitReportResponse> => ({
+const signalsScoutEmitReport = (): ToolBase<
+ ReturnType<typeof SignalsScoutEmitReportSchema>,
+ Schemas.EmitReportResponse
+> => ({
name: 'signals-scout-emit-report',
- schema: SignalsScoutEmitReportSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutEmitReportSchema>) => {
+ schema: SignalsScoutEmitReportSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutEmitReportSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.title !== undefined) {
@@ -1492,14 +1613,19 @@ const signalsScoutEmitReport = (): ToolBase<typeof SignalsScoutEmitReportSchema,
},
})
-const SignalsScoutEmitSignalSchema = SignalsScoutEmitSignalParams.omit({ project_id: true }).extend(
- SignalsScoutEmitSignalBody.shape
-)
+const SignalsScoutEmitSignalSchema = () => {
+ const SignalsScoutEmitSignalBody = orvalSchemas.SignalsScoutEmitSignalBody()
+ const SignalsScoutEmitSignalParams = orvalSchemas.SignalsScoutEmitSignalParams()
+ return SignalsScoutEmitSignalParams.omit({ project_id: true }).extend(SignalsScoutEmitSignalBody.shape)
+}
-const signalsScoutEmitSignal = (): ToolBase<typeof SignalsScoutEmitSignalSchema, Schemas.EmitFindingResponse> => ({
+const signalsScoutEmitSignal = (): ToolBase<
+ ReturnType<typeof SignalsScoutEmitSignalSchema>,
+ Schemas.EmitFindingResponse
+> => ({
name: 'signals-scout-emit-signal',
- schema: SignalsScoutEmitSignalSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutEmitSignalSchema>) => {
+ schema: SignalsScoutEmitSignalSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutEmitSignalSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.description !== undefined) {
@@ -1541,15 +1667,18 @@ const signalsScoutEmitSignal = (): ToolBase<typeof SignalsScoutEmitSignalSchema,
},
})
-const SignalsScoutMembersListSchema = SignalsScoutMembersListQueryParams
+const SignalsScoutMembersListSchema = () => {
+ const SignalsScoutMembersListQueryParams = orvalSchemas.SignalsScoutMembersListQueryParams()
+ return SignalsScoutMembersListQueryParams
+}
const signalsScoutMembersList = (): ToolBase<
- typeof SignalsScoutMembersListSchema,
+ ReturnType<typeof SignalsScoutMembersListSchema>,
WithPostHogUrl<Schemas.ScoutMember[]>
> => ({
name: 'signals-scout-members-list',
- schema: SignalsScoutMembersListSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutMembersListSchema>) => {
+ schema: SignalsScoutMembersListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutMembersListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ScoutMember[]>({
method: 'GET',
@@ -1562,15 +1691,18 @@ const signalsScoutMembersList = (): ToolBase<
},
})
-const SignalsScoutProjectProfileGetSchema = SignalsScoutProjectProfileGetQueryParams
+const SignalsScoutProjectProfileGetSchema = () => {
+ const SignalsScoutProjectProfileGetQueryParams = orvalSchemas.SignalsScoutProjectProfileGetQueryParams()
+ return SignalsScoutProjectProfileGetQueryParams
+}
const signalsScoutProjectProfileGet = (): ToolBase<
- typeof SignalsScoutProjectProfileGetSchema,
+ ReturnType<typeof SignalsScoutProjectProfileGetSchema>,
Schemas.ProjectProfile
> => ({
name: 'signals-scout-project-profile-get',
- schema: SignalsScoutProjectProfileGetSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutProjectProfileGetSchema>) => {
+ schema: SignalsScoutProjectProfileGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutProjectProfileGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ProjectProfile>({
method: 'GET',
@@ -1583,12 +1715,15 @@ const signalsScoutProjectProfileGet = (): ToolBase<
},
})
-const SignalsScoutRunNowSchema = SignalsScoutConfigRunParams.omit({ project_id: true })
+const SignalsScoutRunNowSchema = () => {
+ const SignalsScoutConfigRunParams = orvalSchemas.SignalsScoutConfigRunParams()
+ return SignalsScoutConfigRunParams.omit({ project_id: true })
+}
-const signalsScoutRunNow = (): ToolBase<typeof SignalsScoutRunNowSchema, unknown> => ({
+const signalsScoutRunNow = (): ToolBase<ReturnType<typeof SignalsScoutRunNowSchema>, unknown> => ({
name: 'signals-scout-run-now',
- schema: SignalsScoutRunNowSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutRunNowSchema>) => {
+ schema: SignalsScoutRunNowSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutRunNowSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'POST',
@@ -1598,15 +1733,18 @@ const signalsScoutRunNow = (): ToolBase<typeof SignalsScoutRunNowSchema, unknown
},
})
-const SignalsScoutRunsEmissionReportsSchema = SignalsScoutRunsEmissionReportsParams.omit({ project_id: true })
+const SignalsScoutRunsEmissionReportsSchema = () => {
+ const SignalsScoutRunsEmissionReportsParams = orvalSchemas.SignalsScoutRunsEmissionReportsParams()
+ return SignalsScoutRunsEmissionReportsParams.omit({ project_id: true })
+}
const signalsScoutRunsEmissionReports = (): ToolBase<
- typeof SignalsScoutRunsEmissionReportsSchema,
+ ReturnType<typeof SignalsScoutRunsEmissionReportsSchema>,
WithPostHogUrl<Schemas.ScoutEmissionReportLink[]>
> => ({
name: 'signals-scout-runs-emission-reports',
- schema: SignalsScoutRunsEmissionReportsSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutRunsEmissionReportsSchema>) => {
+ schema: SignalsScoutRunsEmissionReportsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutRunsEmissionReportsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ScoutEmissionReportLink[]>({
method: 'GET',
@@ -1616,15 +1754,18 @@ const signalsScoutRunsEmissionReports = (): ToolBase<
},
})
-const SignalsScoutRunsEmissionsListSchema = SignalsScoutRunsEmissionsParams.omit({ project_id: true })
+const SignalsScoutRunsEmissionsListSchema = () => {
+ const SignalsScoutRunsEmissionsParams = orvalSchemas.SignalsScoutRunsEmissionsParams()
+ return SignalsScoutRunsEmissionsParams.omit({ project_id: true })
+}
const signalsScoutRunsEmissionsList = (): ToolBase<
- typeof SignalsScoutRunsEmissionsListSchema,
+ ReturnType<typeof SignalsScoutRunsEmissionsListSchema>,
WithPostHogUrl<Schemas.SignalScoutEmission[]>
> => ({
name: 'signals-scout-runs-emissions-list',
- schema: SignalsScoutRunsEmissionsListSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutRunsEmissionsListSchema>) => {
+ schema: SignalsScoutRunsEmissionsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutRunsEmissionsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SignalScoutEmission[]>({
method: 'GET',
@@ -1634,15 +1775,18 @@ const signalsScoutRunsEmissionsList = (): ToolBase<
},
})
-const SignalsScoutRunsListSchema = SignalsScoutRunsListQueryParams
+const SignalsScoutRunsListSchema = () => {
+ const SignalsScoutRunsListQueryParams = orvalSchemas.SignalsScoutRunsListQueryParams()
+ return SignalsScoutRunsListQueryParams
+}
const signalsScoutRunsList = (): ToolBase<
- typeof SignalsScoutRunsListSchema,
+ ReturnType<typeof SignalsScoutRunsListSchema>,
WithPostHogUrl<Schemas.SignalScoutRunSummary[]>
> => ({
name: 'signals-scout-runs-list',
- schema: SignalsScoutRunsListSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutRunsListSchema>) => {
+ schema: SignalsScoutRunsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutRunsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SignalScoutRunSummary[]>({
method: 'GET',
@@ -1661,15 +1805,18 @@ const signalsScoutRunsList = (): ToolBase<
},
})
-const SignalsScoutRunsRecentEmissionsSchema = SignalsScoutRunsRecentEmissionsQueryParams
+const SignalsScoutRunsRecentEmissionsSchema = () => {
+ const SignalsScoutRunsRecentEmissionsQueryParams = orvalSchemas.SignalsScoutRunsRecentEmissionsQueryParams()
+ return SignalsScoutRunsRecentEmissionsQueryParams
+}
const signalsScoutRunsRecentEmissions = (): ToolBase<
- typeof SignalsScoutRunsRecentEmissionsSchema,
+ ReturnType<typeof SignalsScoutRunsRecentEmissionsSchema>,
WithPostHogUrl<Schemas.SignalScoutEmission[]>
> => ({
name: 'signals-scout-runs-recent-emissions',
- schema: SignalsScoutRunsRecentEmissionsSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutRunsRecentEmissionsSchema>) => {
+ schema: SignalsScoutRunsRecentEmissionsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutRunsRecentEmissionsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SignalScoutEmission[]>({
method: 'GET',
@@ -1685,12 +1832,18 @@ const signalsScoutRunsRecentEmissions = (): ToolBase<
},
})
-const SignalsScoutRunsRetrieveSchema = SignalsScoutRunsRetrieveParams.omit({ project_id: true })
+const SignalsScoutRunsRetrieveSchema = () => {
+ const SignalsScoutRunsRetrieveParams = orvalSchemas.SignalsScoutRunsRetrieveParams()
+ return SignalsScoutRunsRetrieveParams.omit({ project_id: true })
+}
-const signalsScoutRunsRetrieve = (): ToolBase<typeof SignalsScoutRunsRetrieveSchema, Schemas.SignalScoutRunDetail> => ({
+const signalsScoutRunsRetrieve = (): ToolBase<
+ ReturnType<typeof SignalsScoutRunsRetrieveSchema>,
+ Schemas.SignalScoutRunDetail
+> => ({
name: 'signals-scout-runs-retrieve',
- schema: SignalsScoutRunsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutRunsRetrieveSchema>) => {
+ schema: SignalsScoutRunsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutRunsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SignalScoutRunDetail>({
method: 'GET',
@@ -1700,15 +1853,18 @@ const signalsScoutRunsRetrieve = (): ToolBase<typeof SignalsScoutRunsRetrieveSch
},
})
-const SignalsScoutScratchpadForgetSchema = SignalsScoutScratchpadForgetBody
+const SignalsScoutScratchpadForgetSchema = () => {
+ const SignalsScoutScratchpadForgetBody = orvalSchemas.SignalsScoutScratchpadForgetBody()
+ return SignalsScoutScratchpadForgetBody
+}
const signalsScoutScratchpadForget = (): ToolBase<
- typeof SignalsScoutScratchpadForgetSchema,
+ ReturnType<typeof SignalsScoutScratchpadForgetSchema>,
Schemas.ForgetResponse
> => ({
name: 'signals-scout-scratchpad-forget',
- schema: SignalsScoutScratchpadForgetSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutScratchpadForgetSchema>) => {
+ schema: SignalsScoutScratchpadForgetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutScratchpadForgetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.key !== undefined) {
@@ -1723,15 +1879,18 @@ const signalsScoutScratchpadForget = (): ToolBase<
},
})
-const SignalsScoutScratchpadRememberSchema = SignalsScoutScratchpadRememberBody
+const SignalsScoutScratchpadRememberSchema = () => {
+ const SignalsScoutScratchpadRememberBody = orvalSchemas.SignalsScoutScratchpadRememberBody()
+ return SignalsScoutScratchpadRememberBody
+}
const signalsScoutScratchpadRemember = (): ToolBase<
- typeof SignalsScoutScratchpadRememberSchema,
+ ReturnType<typeof SignalsScoutScratchpadRememberSchema>,
Schemas.ScratchpadEntry
> => ({
name: 'signals-scout-scratchpad-remember',
- schema: SignalsScoutScratchpadRememberSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutScratchpadRememberSchema>) => {
+ schema: SignalsScoutScratchpadRememberSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutScratchpadRememberSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.key !== undefined) {
@@ -1755,15 +1914,18 @@ const signalsScoutScratchpadRemember = (): ToolBase<
},
})
-const SignalsScoutScratchpadSearchSchema = SignalsScoutScratchpadSearchQueryParams
+const SignalsScoutScratchpadSearchSchema = () => {
+ const SignalsScoutScratchpadSearchQueryParams = orvalSchemas.SignalsScoutScratchpadSearchQueryParams()
+ return SignalsScoutScratchpadSearchQueryParams
+}
const signalsScoutScratchpadSearch = (): ToolBase<
- typeof SignalsScoutScratchpadSearchSchema,
+ ReturnType<typeof SignalsScoutScratchpadSearchSchema>,
WithPostHogUrl<Schemas.ScratchpadEntry[]>
> => ({
name: 'signals-scout-scratchpad-search',
- schema: SignalsScoutScratchpadSearchSchema,
- handler: async (context: Context, params: z.infer<typeof SignalsScoutScratchpadSearchSchema>) => {
+ schema: SignalsScoutScratchpadSearchSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SignalsScoutScratchpadSearchSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ScratchpadEntry[]>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/skills.ts b/services/mcp/src/tools/generated/skills.ts
index 3017b2ec4d6c..311dfc4ea9b8 100644
--- a/services/mcp/src/tools/generated/skills.ts
+++ b/services/mcp/src/tools/generated/skills.ts
@@ -2,38 +2,22 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- LlmSkillsCreateBody,
- LlmSkillsListQueryParams,
- LlmSkillsMarketplaceInstallCommandCreateBody,
- LlmSkillsNameArchiveCreateParams,
- LlmSkillsNameDuplicateCreateBody,
- LlmSkillsNameDuplicateCreateParams,
- LlmSkillsNameFilesCreateBody,
- LlmSkillsNameFilesCreateParams,
- LlmSkillsNameFilesDestroyParams,
- LlmSkillsNameFilesDestroyQueryParams,
- LlmSkillsNameFilesRenameCreateBody,
- LlmSkillsNameFilesRenameCreateParams,
- LlmSkillsNameFilesRetrieveParams,
- LlmSkillsNameFilesRetrieveQueryParams,
- LlmSkillsNamePartialUpdateBody,
- LlmSkillsNamePartialUpdateParams,
- LlmSkillsNameRetrieveParams,
- LlmSkillsNameRetrieveQueryParams,
-} from '@/generated/skills/api'
+import * as orvalSchemas from '@/generated/skills/api'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const SkillArchiveSchema = LlmSkillsNameArchiveCreateParams.omit({ project_id: true }).extend({
- skill_name: LlmSkillsNameArchiveCreateParams.shape['skill_name'].describe(
- 'The kebab-case name of the skill to archive.'
- ),
-})
+const SkillArchiveSchema = () => {
+ const LlmSkillsNameArchiveCreateParams = orvalSchemas.LlmSkillsNameArchiveCreateParams()
+ return LlmSkillsNameArchiveCreateParams.omit({ project_id: true }).extend({
+ skill_name: LlmSkillsNameArchiveCreateParams.shape['skill_name'].describe(
+ 'The kebab-case name of the skill to archive.'
+ ),
+ })
+}
-const skillArchive = (): ToolBase<typeof SkillArchiveSchema, unknown> => ({
+const skillArchive = (): ToolBase<ReturnType<typeof SkillArchiveSchema>, unknown> => ({
name: 'skill-archive',
- schema: SkillArchiveSchema,
- handler: async (context: Context, params: z.infer<typeof SkillArchiveSchema>) => {
+ schema: SkillArchiveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SkillArchiveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'POST',
@@ -43,12 +27,15 @@ const skillArchive = (): ToolBase<typeof SkillArchiveSchema, unknown> => ({
},
})
-const SkillCreateSchema = LlmSkillsCreateBody
+const SkillCreateSchema = () => {
+ const LlmSkillsCreateBody = orvalSchemas.LlmSkillsCreateBody()
+ return LlmSkillsCreateBody
+}
-const skillCreate = (): ToolBase<typeof SkillCreateSchema, Schemas.LLMSkill> => ({
+const skillCreate = (): ToolBase<ReturnType<typeof SkillCreateSchema>, Schemas.LLMSkill> => ({
name: 'skill-create',
- schema: SkillCreateSchema,
- handler: async (context: Context, params: z.infer<typeof SkillCreateSchema>) => {
+ schema: SkillCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SkillCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -87,14 +74,16 @@ const skillCreate = (): ToolBase<typeof SkillCreateSchema, Schemas.LLMSkill> =>
},
})
-const SkillDuplicateSchema = LlmSkillsNameDuplicateCreateParams.omit({ project_id: true }).extend(
- LlmSkillsNameDuplicateCreateBody.shape
-)
+const SkillDuplicateSchema = () => {
+ const LlmSkillsNameDuplicateCreateBody = orvalSchemas.LlmSkillsNameDuplicateCreateBody()
+ const LlmSkillsNameDuplicateCreateParams = orvalSchemas.LlmSkillsNameDuplicateCreateParams()
+ return LlmSkillsNameDuplicateCreateParams.omit({ project_id: true }).extend(LlmSkillsNameDuplicateCreateBody.shape)
+}
-const skillDuplicate = (): ToolBase<typeof SkillDuplicateSchema, Schemas.LLMSkill> => ({
+const skillDuplicate = (): ToolBase<ReturnType<typeof SkillDuplicateSchema>, Schemas.LLMSkill> => ({
name: 'skill-duplicate',
- schema: SkillDuplicateSchema,
- handler: async (context: Context, params: z.infer<typeof SkillDuplicateSchema>) => {
+ schema: SkillDuplicateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SkillDuplicateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.new_name !== undefined) {
@@ -109,14 +98,16 @@ const skillDuplicate = (): ToolBase<typeof SkillDuplicateSchema, Schemas.LLMSkil
},
})
-const SkillFileCreateSchema = LlmSkillsNameFilesCreateParams.omit({ project_id: true }).extend(
- LlmSkillsNameFilesCreateBody.shape
-)
+const SkillFileCreateSchema = () => {
+ const LlmSkillsNameFilesCreateBody = orvalSchemas.LlmSkillsNameFilesCreateBody()
+ const LlmSkillsNameFilesCreateParams = orvalSchemas.LlmSkillsNameFilesCreateParams()
+ return LlmSkillsNameFilesCreateParams.omit({ project_id: true }).extend(LlmSkillsNameFilesCreateBody.shape)
+}
-const skillFileCreate = (): ToolBase<typeof SkillFileCreateSchema, Schemas.LLMSkill> => ({
+const skillFileCreate = (): ToolBase<ReturnType<typeof SkillFileCreateSchema>, Schemas.LLMSkill> => ({
name: 'skill-file-create',
- schema: SkillFileCreateSchema,
- handler: async (context: Context, params: z.infer<typeof SkillFileCreateSchema>) => {
+ schema: SkillFileCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SkillFileCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.path !== undefined) {
@@ -140,14 +131,16 @@ const skillFileCreate = (): ToolBase<typeof SkillFileCreateSchema, Schemas.LLMSk
},
})
-const SkillFileDeleteSchema = LlmSkillsNameFilesDestroyParams.omit({ project_id: true }).extend(
- LlmSkillsNameFilesDestroyQueryParams.shape
-)
+const SkillFileDeleteSchema = () => {
+ const LlmSkillsNameFilesDestroyParams = orvalSchemas.LlmSkillsNameFilesDestroyParams()
+ const LlmSkillsNameFilesDestroyQueryParams = orvalSchemas.LlmSkillsNameFilesDestroyQueryParams()
+ return LlmSkillsNameFilesDestroyParams.omit({ project_id: true }).extend(LlmSkillsNameFilesDestroyQueryParams.shape)
+}
-const skillFileDelete = (): ToolBase<typeof SkillFileDeleteSchema, Schemas.LLMSkill> => ({
+const skillFileDelete = (): ToolBase<ReturnType<typeof SkillFileDeleteSchema>, Schemas.LLMSkill> => ({
name: 'skill-file-delete',
- schema: SkillFileDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof SkillFileDeleteSchema>) => {
+ schema: SkillFileDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SkillFileDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.LLMSkill>({
method: 'DELETE',
@@ -160,14 +153,18 @@ const skillFileDelete = (): ToolBase<typeof SkillFileDeleteSchema, Schemas.LLMSk
},
})
-const SkillFileGetSchema = LlmSkillsNameFilesRetrieveParams.omit({ project_id: true }).extend(
- LlmSkillsNameFilesRetrieveQueryParams.shape
-)
+const SkillFileGetSchema = () => {
+ const LlmSkillsNameFilesRetrieveParams = orvalSchemas.LlmSkillsNameFilesRetrieveParams()
+ const LlmSkillsNameFilesRetrieveQueryParams = orvalSchemas.LlmSkillsNameFilesRetrieveQueryParams()
+ return LlmSkillsNameFilesRetrieveParams.omit({ project_id: true }).extend(
+ LlmSkillsNameFilesRetrieveQueryParams.shape
+ )
+}
-const skillFileGet = (): ToolBase<typeof SkillFileGetSchema, Schemas.LLMSkillFile> => ({
+const skillFileGet = (): ToolBase<ReturnType<typeof SkillFileGetSchema>, Schemas.LLMSkillFile> => ({
name: 'skill-file-get',
- schema: SkillFileGetSchema,
- handler: async (context: Context, params: z.infer<typeof SkillFileGetSchema>) => {
+ schema: SkillFileGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SkillFileGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.LLMSkillFile>({
method: 'GET',
@@ -180,14 +177,18 @@ const skillFileGet = (): ToolBase<typeof SkillFileGetSchema, Schemas.LLMSkillFil
},
})
-const SkillFileRenameSchema = LlmSkillsNameFilesRenameCreateParams.omit({ project_id: true }).extend(
- LlmSkillsNameFilesRenameCreateBody.shape
-)
+const SkillFileRenameSchema = () => {
+ const LlmSkillsNameFilesRenameCreateBody = orvalSchemas.LlmSkillsNameFilesRenameCreateBody()
+ const LlmSkillsNameFilesRenameCreateParams = orvalSchemas.LlmSkillsNameFilesRenameCreateParams()
+ return LlmSkillsNameFilesRenameCreateParams.omit({ project_id: true }).extend(
+ LlmSkillsNameFilesRenameCreateBody.shape
+ )
+}
-const skillFileRename = (): ToolBase<typeof SkillFileRenameSchema, Schemas.LLMSkill> => ({
+const skillFileRename = (): ToolBase<ReturnType<typeof SkillFileRenameSchema>, Schemas.LLMSkill> => ({
name: 'skill-file-rename',
- schema: SkillFileRenameSchema,
- handler: async (context: Context, params: z.infer<typeof SkillFileRenameSchema>) => {
+ schema: SkillFileRenameSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SkillFileRenameSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.old_path !== undefined) {
@@ -208,14 +209,16 @@ const skillFileRename = (): ToolBase<typeof SkillFileRenameSchema, Schemas.LLMSk
},
})
-const SkillGetSchema = LlmSkillsNameRetrieveParams.omit({ project_id: true }).extend(
- LlmSkillsNameRetrieveQueryParams.shape
-)
+const SkillGetSchema = () => {
+ const LlmSkillsNameRetrieveParams = orvalSchemas.LlmSkillsNameRetrieveParams()
+ const LlmSkillsNameRetrieveQueryParams = orvalSchemas.LlmSkillsNameRetrieveQueryParams()
+ return LlmSkillsNameRetrieveParams.omit({ project_id: true }).extend(LlmSkillsNameRetrieveQueryParams.shape)
+}
-const skillGet = (): ToolBase<typeof SkillGetSchema, Schemas.LLMSkill> => ({
+const skillGet = (): ToolBase<ReturnType<typeof SkillGetSchema>, Schemas.LLMSkill> => ({
name: 'skill-get',
- schema: SkillGetSchema,
- handler: async (context: Context, params: z.infer<typeof SkillGetSchema>) => {
+ schema: SkillGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SkillGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.LLMSkill>({
method: 'GET',
@@ -230,12 +233,15 @@ const skillGet = (): ToolBase<typeof SkillGetSchema, Schemas.LLMSkill> => ({
},
})
-const SkillListSchema = LlmSkillsListQueryParams
+const SkillListSchema = () => {
+ const LlmSkillsListQueryParams = orvalSchemas.LlmSkillsListQueryParams()
+ return LlmSkillsListQueryParams
+}
-const skillList = (): ToolBase<typeof SkillListSchema, Schemas.PaginatedLLMSkillListList> => ({
+const skillList = (): ToolBase<ReturnType<typeof SkillListSchema>, Schemas.PaginatedLLMSkillListList> => ({
name: 'skill-list',
- schema: SkillListSchema,
- handler: async (context: Context, params: z.infer<typeof SkillListSchema>) => {
+ schema: SkillListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SkillListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedLLMSkillListList>({
method: 'GET',
@@ -253,19 +259,22 @@ const skillList = (): ToolBase<typeof SkillListSchema, Schemas.PaginatedLLMSkill
},
})
-const SkillStoreInstallCommandSchema = LlmSkillsMarketplaceInstallCommandCreateBody.extend({
- rotate: LlmSkillsMarketplaceInstallCommandCreateBody.shape['rotate'].describe(
- "Set true only when the user explicitly wants a fresh token (e.g. setting up a new machine): it rolls the caller's existing credential, invalidating their previous token. Leave false (default) to reuse the existing credential — the first call always mints one regardless."
- ),
-})
+const SkillStoreInstallCommandSchema = () => {
+ const LlmSkillsMarketplaceInstallCommandCreateBody = orvalSchemas.LlmSkillsMarketplaceInstallCommandCreateBody()
+ return LlmSkillsMarketplaceInstallCommandCreateBody.extend({
+ rotate: LlmSkillsMarketplaceInstallCommandCreateBody.shape['rotate'].describe(
+ "Set true only when the user explicitly wants a fresh token (e.g. setting up a new machine): it rolls the caller's existing credential, invalidating their previous token. Leave false (default) to reuse the existing credential — the first call always mints one regardless."
+ ),
+ })
+}
const skillStoreInstallCommand = (): ToolBase<
- typeof SkillStoreInstallCommandSchema,
+ ReturnType<typeof SkillStoreInstallCommandSchema>,
Schemas.LLMSkillMarketplaceCommand
> => ({
name: 'skill-store-install-command',
- schema: SkillStoreInstallCommandSchema,
- handler: async (context: Context, params: z.infer<typeof SkillStoreInstallCommandSchema>) => {
+ schema: SkillStoreInstallCommandSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SkillStoreInstallCommandSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.rotate !== undefined) {
@@ -280,14 +289,16 @@ const skillStoreInstallCommand = (): ToolBase<
},
})
-const SkillUpdateSchema = LlmSkillsNamePartialUpdateParams.omit({ project_id: true }).extend(
- LlmSkillsNamePartialUpdateBody.shape
-)
+const SkillUpdateSchema = () => {
+ const LlmSkillsNamePartialUpdateBody = orvalSchemas.LlmSkillsNamePartialUpdateBody()
+ const LlmSkillsNamePartialUpdateParams = orvalSchemas.LlmSkillsNamePartialUpdateParams()
+ return LlmSkillsNamePartialUpdateParams.omit({ project_id: true }).extend(LlmSkillsNamePartialUpdateBody.shape)
+}
-const skillUpdate = (): ToolBase<typeof SkillUpdateSchema, Schemas.LLMSkill> => ({
+const skillUpdate = (): ToolBase<ReturnType<typeof SkillUpdateSchema>, Schemas.LLMSkill> => ({
name: 'skill-update',
- schema: SkillUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof SkillUpdateSchema>) => {
+ schema: SkillUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SkillUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.body !== undefined) {
diff --git a/services/mcp/src/tools/generated/stamphog.ts b/services/mcp/src/tools/generated/stamphog.ts
index b5e31f620bcf..1897d12151cd 100644
--- a/services/mcp/src/tools/generated/stamphog.ts
+++ b/services/mcp/src/tools/generated/stamphog.ts
@@ -2,28 +2,22 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- StamphogDigestRunsListQueryParams,
- StamphogPullRequestsListQueryParams,
- StamphogPullRequestsRetrieveParams,
- StamphogRepoConfigsDestroyParams,
- StamphogRepoConfigsListQueryParams,
- StamphogRepoConfigsRetrieveParams,
- StamphogReviewRunsListQueryParams,
- StamphogReviewRunsRetrieveParams,
-} from '@/generated/stamphog/api'
+import * as orvalSchemas from '@/generated/stamphog/api'
import { withPostHogUrl, omitResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const StamphogDigestRunsListSchema = StamphogDigestRunsListQueryParams
+const StamphogDigestRunsListSchema = () => {
+ const StamphogDigestRunsListQueryParams = orvalSchemas.StamphogDigestRunsListQueryParams()
+ return StamphogDigestRunsListQueryParams
+}
const stamphogDigestRunsList = (): ToolBase<
- typeof StamphogDigestRunsListSchema,
+ ReturnType<typeof StamphogDigestRunsListSchema>,
WithPostHogUrl<Schemas.PaginatedDigestRunList>
> => ({
name: 'stamphog-digest-runs-list',
- schema: StamphogDigestRunsListSchema,
- handler: async (context: Context, params: z.infer<typeof StamphogDigestRunsListSchema>) => {
+ schema: StamphogDigestRunsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof StamphogDigestRunsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedDigestRunList>({
method: 'GET',
@@ -38,12 +32,18 @@ const stamphogDigestRunsList = (): ToolBase<
},
})
-const StamphogPullRequestsGetSchema = StamphogPullRequestsRetrieveParams.omit({ project_id: true })
+const StamphogPullRequestsGetSchema = () => {
+ const StamphogPullRequestsRetrieveParams = orvalSchemas.StamphogPullRequestsRetrieveParams()
+ return StamphogPullRequestsRetrieveParams.omit({ project_id: true })
+}
-const stamphogPullRequestsGet = (): ToolBase<typeof StamphogPullRequestsGetSchema, Schemas.StamphogPullRequest> => ({
+const stamphogPullRequestsGet = (): ToolBase<
+ ReturnType<typeof StamphogPullRequestsGetSchema>,
+ Schemas.StamphogPullRequest
+> => ({
name: 'stamphog-pull-requests-get',
- schema: StamphogPullRequestsGetSchema,
- handler: async (context: Context, params: z.infer<typeof StamphogPullRequestsGetSchema>) => {
+ schema: StamphogPullRequestsGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof StamphogPullRequestsGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.StamphogPullRequest>({
method: 'GET',
@@ -53,15 +53,18 @@ const stamphogPullRequestsGet = (): ToolBase<typeof StamphogPullRequestsGetSchem
},
})
-const StamphogPullRequestsListSchema = StamphogPullRequestsListQueryParams
+const StamphogPullRequestsListSchema = () => {
+ const StamphogPullRequestsListQueryParams = orvalSchemas.StamphogPullRequestsListQueryParams()
+ return StamphogPullRequestsListQueryParams
+}
const stamphogPullRequestsList = (): ToolBase<
- typeof StamphogPullRequestsListSchema,
+ ReturnType<typeof StamphogPullRequestsListSchema>,
WithPostHogUrl<Schemas.PaginatedStamphogPullRequestList>
> => ({
name: 'stamphog-pull-requests-list',
- schema: StamphogPullRequestsListSchema,
- handler: async (context: Context, params: z.infer<typeof StamphogPullRequestsListSchema>) => {
+ schema: StamphogPullRequestsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof StamphogPullRequestsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedStamphogPullRequestList>({
method: 'GET',
@@ -77,12 +80,15 @@ const stamphogPullRequestsList = (): ToolBase<
},
})
-const StamphogRepoConfigsDeleteSchema = StamphogRepoConfigsDestroyParams.omit({ project_id: true })
+const StamphogRepoConfigsDeleteSchema = () => {
+ const StamphogRepoConfigsDestroyParams = orvalSchemas.StamphogRepoConfigsDestroyParams()
+ return StamphogRepoConfigsDestroyParams.omit({ project_id: true })
+}
-const stamphogRepoConfigsDelete = (): ToolBase<typeof StamphogRepoConfigsDeleteSchema, unknown> => ({
+const stamphogRepoConfigsDelete = (): ToolBase<ReturnType<typeof StamphogRepoConfigsDeleteSchema>, unknown> => ({
name: 'stamphog-repo-configs-delete',
- schema: StamphogRepoConfigsDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof StamphogRepoConfigsDeleteSchema>) => {
+ schema: StamphogRepoConfigsDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof StamphogRepoConfigsDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -92,12 +98,18 @@ const stamphogRepoConfigsDelete = (): ToolBase<typeof StamphogRepoConfigsDeleteS
},
})
-const StamphogRepoConfigsGetSchema = StamphogRepoConfigsRetrieveParams.omit({ project_id: true })
+const StamphogRepoConfigsGetSchema = () => {
+ const StamphogRepoConfigsRetrieveParams = orvalSchemas.StamphogRepoConfigsRetrieveParams()
+ return StamphogRepoConfigsRetrieveParams.omit({ project_id: true })
+}
-const stamphogRepoConfigsGet = (): ToolBase<typeof StamphogRepoConfigsGetSchema, Schemas.StamphogRepoConfig> => ({
+const stamphogRepoConfigsGet = (): ToolBase<
+ ReturnType<typeof StamphogRepoConfigsGetSchema>,
+ Schemas.StamphogRepoConfig
+> => ({
name: 'stamphog-repo-configs-get',
- schema: StamphogRepoConfigsGetSchema,
- handler: async (context: Context, params: z.infer<typeof StamphogRepoConfigsGetSchema>) => {
+ schema: StamphogRepoConfigsGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof StamphogRepoConfigsGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.StamphogRepoConfig>({
method: 'GET',
@@ -107,15 +119,18 @@ const stamphogRepoConfigsGet = (): ToolBase<typeof StamphogRepoConfigsGetSchema,
},
})
-const StamphogRepoConfigsListSchema = StamphogRepoConfigsListQueryParams
+const StamphogRepoConfigsListSchema = () => {
+ const StamphogRepoConfigsListQueryParams = orvalSchemas.StamphogRepoConfigsListQueryParams()
+ return StamphogRepoConfigsListQueryParams
+}
const stamphogRepoConfigsList = (): ToolBase<
- typeof StamphogRepoConfigsListSchema,
+ ReturnType<typeof StamphogRepoConfigsListSchema>,
WithPostHogUrl<Schemas.PaginatedStamphogRepoConfigList>
> => ({
name: 'stamphog-repo-configs-list',
- schema: StamphogRepoConfigsListSchema,
- handler: async (context: Context, params: z.infer<typeof StamphogRepoConfigsListSchema>) => {
+ schema: StamphogRepoConfigsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof StamphogRepoConfigsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedStamphogRepoConfigList>({
method: 'GET',
@@ -129,12 +144,15 @@ const stamphogRepoConfigsList = (): ToolBase<
},
})
-const StamphogReviewRunsGetSchema = StamphogReviewRunsRetrieveParams.omit({ project_id: true })
+const StamphogReviewRunsGetSchema = () => {
+ const StamphogReviewRunsRetrieveParams = orvalSchemas.StamphogReviewRunsRetrieveParams()
+ return StamphogReviewRunsRetrieveParams.omit({ project_id: true })
+}
-const stamphogReviewRunsGet = (): ToolBase<typeof StamphogReviewRunsGetSchema, Schemas.ReviewRun> => ({
+const stamphogReviewRunsGet = (): ToolBase<ReturnType<typeof StamphogReviewRunsGetSchema>, Schemas.ReviewRun> => ({
name: 'stamphog-review-runs-get',
- schema: StamphogReviewRunsGetSchema,
- handler: async (context: Context, params: z.infer<typeof StamphogReviewRunsGetSchema>) => {
+ schema: StamphogReviewRunsGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof StamphogReviewRunsGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ReviewRun>({
method: 'GET',
@@ -144,15 +162,18 @@ const stamphogReviewRunsGet = (): ToolBase<typeof StamphogReviewRunsGetSchema, S
},
})
-const StamphogReviewRunsListSchema = StamphogReviewRunsListQueryParams
+const StamphogReviewRunsListSchema = () => {
+ const StamphogReviewRunsListQueryParams = orvalSchemas.StamphogReviewRunsListQueryParams()
+ return StamphogReviewRunsListQueryParams
+}
const stamphogReviewRunsList = (): ToolBase<
- typeof StamphogReviewRunsListSchema,
+ ReturnType<typeof StamphogReviewRunsListSchema>,
WithPostHogUrl<Schemas.PaginatedReviewRunList>
> => ({
name: 'stamphog-review-runs-list',
- schema: StamphogReviewRunsListSchema,
- handler: async (context: Context, params: z.infer<typeof StamphogReviewRunsListSchema>) => {
+ schema: StamphogReviewRunsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof StamphogReviewRunsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedReviewRunList>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/streamlit_apps.ts b/services/mcp/src/tools/generated/streamlit_apps.ts
index be835337c559..342a8205fc9c 100644
--- a/services/mcp/src/tools/generated/streamlit_apps.ts
+++ b/services/mcp/src/tools/generated/streamlit_apps.ts
@@ -2,29 +2,22 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- StreamlitAppsCreateBody,
- StreamlitAppsCreateVersionFromSourceCreateBody,
- StreamlitAppsCreateVersionFromSourceCreateParams,
- StreamlitAppsDestroyParams,
- StreamlitAppsListQueryParams,
- StreamlitAppsPartialUpdateBody,
- StreamlitAppsPartialUpdateParams,
- StreamlitAppsRetrieveParams,
- StreamlitAppsStartCreateParams,
- StreamlitAppsStatusRetrieveParams,
- StreamlitAppsStopCreateParams,
- StreamlitAppsVersionsRetrieveParams,
-} from '@/generated/streamlit_apps/api'
+import * as orvalSchemas from '@/generated/streamlit_apps/api'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const StreamlitAppsCreateSchema = StreamlitAppsCreateBody
+const StreamlitAppsCreateSchema = () => {
+ const StreamlitAppsCreateBody = orvalSchemas.StreamlitAppsCreateBody()
+ return StreamlitAppsCreateBody
+}
-const streamlitAppsCreate = (): ToolBase<typeof StreamlitAppsCreateSchema, WithPostHogUrl<Schemas.AppContract>> => ({
+const streamlitAppsCreate = (): ToolBase<
+ ReturnType<typeof StreamlitAppsCreateSchema>,
+ WithPostHogUrl<Schemas.AppContract>
+> => ({
name: 'streamlit-apps-create',
- schema: StreamlitAppsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof StreamlitAppsCreateSchema>) => {
+ schema: StreamlitAppsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof StreamlitAppsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -48,12 +41,15 @@ const streamlitAppsCreate = (): ToolBase<typeof StreamlitAppsCreateSchema, WithP
},
})
-const StreamlitAppsDeleteSchema = StreamlitAppsDestroyParams.omit({ project_id: true })
+const StreamlitAppsDeleteSchema = () => {
+ const StreamlitAppsDestroyParams = orvalSchemas.StreamlitAppsDestroyParams()
+ return StreamlitAppsDestroyParams.omit({ project_id: true })
+}
-const streamlitAppsDelete = (): ToolBase<typeof StreamlitAppsDeleteSchema, unknown> => ({
+const streamlitAppsDelete = (): ToolBase<ReturnType<typeof StreamlitAppsDeleteSchema>, unknown> => ({
name: 'streamlit-apps-delete',
- schema: StreamlitAppsDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof StreamlitAppsDeleteSchema>) => {
+ schema: StreamlitAppsDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof StreamlitAppsDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -63,12 +59,18 @@ const streamlitAppsDelete = (): ToolBase<typeof StreamlitAppsDeleteSchema, unkno
},
})
-const StreamlitAppsGetSchema = StreamlitAppsRetrieveParams.omit({ project_id: true })
+const StreamlitAppsGetSchema = () => {
+ const StreamlitAppsRetrieveParams = orvalSchemas.StreamlitAppsRetrieveParams()
+ return StreamlitAppsRetrieveParams.omit({ project_id: true })
+}
-const streamlitAppsGet = (): ToolBase<typeof StreamlitAppsGetSchema, WithPostHogUrl<Schemas.AppContract>> => ({
+const streamlitAppsGet = (): ToolBase<
+ ReturnType<typeof StreamlitAppsGetSchema>,
+ WithPostHogUrl<Schemas.AppContract>
+> => ({
name: 'streamlit-apps-get',
- schema: StreamlitAppsGetSchema,
- handler: async (context: Context, params: z.infer<typeof StreamlitAppsGetSchema>) => {
+ schema: StreamlitAppsGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof StreamlitAppsGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.AppContract>({
method: 'GET',
@@ -78,15 +80,18 @@ const streamlitAppsGet = (): ToolBase<typeof StreamlitAppsGetSchema, WithPostHog
},
})
-const StreamlitAppsListSchema = StreamlitAppsListQueryParams
+const StreamlitAppsListSchema = () => {
+ const StreamlitAppsListQueryParams = orvalSchemas.StreamlitAppsListQueryParams()
+ return StreamlitAppsListQueryParams
+}
const streamlitAppsList = (): ToolBase<
- typeof StreamlitAppsListSchema,
+ ReturnType<typeof StreamlitAppsListSchema>,
WithPostHogUrl<Schemas.PaginatedAppSummaryContractList>
> => ({
name: 'streamlit-apps-list',
- schema: StreamlitAppsListSchema,
- handler: async (context: Context, params: z.infer<typeof StreamlitAppsListSchema>) => {
+ schema: StreamlitAppsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof StreamlitAppsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedAppSummaryContractList>({
method: 'GET',
@@ -111,18 +116,26 @@ const streamlitAppsList = (): ToolBase<
},
})
-const StreamlitAppsSetSourceSchema = StreamlitAppsCreateVersionFromSourceCreateParams.omit({ project_id: true })
- .extend(StreamlitAppsCreateVersionFromSourceCreateBody.shape)
- .extend({
- source: StreamlitAppsCreateVersionFromSourceCreateBody.shape['source'].describe(
- "The complete Python source for the app's root app.py (a Streamlit script, e.g. starting with `import streamlit as st`). Sent as plain text."
- ),
- })
+const StreamlitAppsSetSourceSchema = () => {
+ const StreamlitAppsCreateVersionFromSourceCreateBody = orvalSchemas.StreamlitAppsCreateVersionFromSourceCreateBody()
+ const StreamlitAppsCreateVersionFromSourceCreateParams =
+ orvalSchemas.StreamlitAppsCreateVersionFromSourceCreateParams()
+ return StreamlitAppsCreateVersionFromSourceCreateParams.omit({ project_id: true })
+ .extend(StreamlitAppsCreateVersionFromSourceCreateBody.shape)
+ .extend({
+ source: StreamlitAppsCreateVersionFromSourceCreateBody.shape['source'].describe(
+ "The complete Python source for the app's root app.py (a Streamlit script, e.g. starting with `import streamlit as st`). Sent as plain text."
+ ),
+ })
+}
-const streamlitAppsSetSource = (): ToolBase<typeof StreamlitAppsSetSourceSchema, Schemas.AppVersionContract> => ({
+const streamlitAppsSetSource = (): ToolBase<
+ ReturnType<typeof StreamlitAppsSetSourceSchema>,
+ Schemas.AppVersionContract
+> => ({
name: 'streamlit-apps-set-source',
- schema: StreamlitAppsSetSourceSchema,
- handler: async (context: Context, params: z.infer<typeof StreamlitAppsSetSourceSchema>) => {
+ schema: StreamlitAppsSetSourceSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof StreamlitAppsSetSourceSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.source !== undefined) {
@@ -137,12 +150,18 @@ const streamlitAppsSetSource = (): ToolBase<typeof StreamlitAppsSetSourceSchema,
},
})
-const StreamlitAppsStartSchema = StreamlitAppsStartCreateParams.omit({ project_id: true })
+const StreamlitAppsStartSchema = () => {
+ const StreamlitAppsStartCreateParams = orvalSchemas.StreamlitAppsStartCreateParams()
+ return StreamlitAppsStartCreateParams.omit({ project_id: true })
+}
-const streamlitAppsStart = (): ToolBase<typeof StreamlitAppsStartSchema, WithPostHogUrl<Schemas.AppContract>> => ({
+const streamlitAppsStart = (): ToolBase<
+ ReturnType<typeof StreamlitAppsStartSchema>,
+ WithPostHogUrl<Schemas.AppContract>
+> => ({
name: 'streamlit-apps-start',
- schema: StreamlitAppsStartSchema,
- handler: async (context: Context, params: z.infer<typeof StreamlitAppsStartSchema>) => {
+ schema: StreamlitAppsStartSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof StreamlitAppsStartSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.AppContract>({
method: 'POST',
@@ -152,12 +171,15 @@ const streamlitAppsStart = (): ToolBase<typeof StreamlitAppsStartSchema, WithPos
},
})
-const StreamlitAppsStatusSchema = StreamlitAppsStatusRetrieveParams.omit({ project_id: true })
+const StreamlitAppsStatusSchema = () => {
+ const StreamlitAppsStatusRetrieveParams = orvalSchemas.StreamlitAppsStatusRetrieveParams()
+ return StreamlitAppsStatusRetrieveParams.omit({ project_id: true })
+}
-const streamlitAppsStatus = (): ToolBase<typeof StreamlitAppsStatusSchema, Schemas.StreamlitAppStatus> => ({
+const streamlitAppsStatus = (): ToolBase<ReturnType<typeof StreamlitAppsStatusSchema>, Schemas.StreamlitAppStatus> => ({
name: 'streamlit-apps-status',
- schema: StreamlitAppsStatusSchema,
- handler: async (context: Context, params: z.infer<typeof StreamlitAppsStatusSchema>) => {
+ schema: StreamlitAppsStatusSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof StreamlitAppsStatusSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.StreamlitAppStatus>({
method: 'GET',
@@ -167,12 +189,18 @@ const streamlitAppsStatus = (): ToolBase<typeof StreamlitAppsStatusSchema, Schem
},
})
-const StreamlitAppsStopSchema = StreamlitAppsStopCreateParams.omit({ project_id: true })
+const StreamlitAppsStopSchema = () => {
+ const StreamlitAppsStopCreateParams = orvalSchemas.StreamlitAppsStopCreateParams()
+ return StreamlitAppsStopCreateParams.omit({ project_id: true })
+}
-const streamlitAppsStop = (): ToolBase<typeof StreamlitAppsStopSchema, WithPostHogUrl<Schemas.AppContract>> => ({
+const streamlitAppsStop = (): ToolBase<
+ ReturnType<typeof StreamlitAppsStopSchema>,
+ WithPostHogUrl<Schemas.AppContract>
+> => ({
name: 'streamlit-apps-stop',
- schema: StreamlitAppsStopSchema,
- handler: async (context: Context, params: z.infer<typeof StreamlitAppsStopSchema>) => {
+ schema: StreamlitAppsStopSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof StreamlitAppsStopSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.AppContract>({
method: 'POST',
@@ -182,14 +210,19 @@ const streamlitAppsStop = (): ToolBase<typeof StreamlitAppsStopSchema, WithPostH
},
})
-const StreamlitAppsUpdateSchema = StreamlitAppsPartialUpdateParams.omit({ project_id: true }).extend(
- StreamlitAppsPartialUpdateBody.shape
-)
+const StreamlitAppsUpdateSchema = () => {
+ const StreamlitAppsPartialUpdateBody = orvalSchemas.StreamlitAppsPartialUpdateBody()
+ const StreamlitAppsPartialUpdateParams = orvalSchemas.StreamlitAppsPartialUpdateParams()
+ return StreamlitAppsPartialUpdateParams.omit({ project_id: true }).extend(StreamlitAppsPartialUpdateBody.shape)
+}
-const streamlitAppsUpdate = (): ToolBase<typeof StreamlitAppsUpdateSchema, WithPostHogUrl<Schemas.AppContract>> => ({
+const streamlitAppsUpdate = (): ToolBase<
+ ReturnType<typeof StreamlitAppsUpdateSchema>,
+ WithPostHogUrl<Schemas.AppContract>
+> => ({
name: 'streamlit-apps-update',
- schema: StreamlitAppsUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof StreamlitAppsUpdateSchema>) => {
+ schema: StreamlitAppsUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof StreamlitAppsUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -213,15 +246,18 @@ const streamlitAppsUpdate = (): ToolBase<typeof StreamlitAppsUpdateSchema, WithP
},
})
-const StreamlitAppsVersionsSchema = StreamlitAppsVersionsRetrieveParams.omit({ project_id: true })
+const StreamlitAppsVersionsSchema = () => {
+ const StreamlitAppsVersionsRetrieveParams = orvalSchemas.StreamlitAppsVersionsRetrieveParams()
+ return StreamlitAppsVersionsRetrieveParams.omit({ project_id: true })
+}
const streamlitAppsVersions = (): ToolBase<
- typeof StreamlitAppsVersionsSchema,
+ ReturnType<typeof StreamlitAppsVersionsSchema>,
WithPostHogUrl<Schemas.StreamlitAppVersionList>
> => ({
name: 'streamlit-apps-versions',
- schema: StreamlitAppsVersionsSchema,
- handler: async (context: Context, params: z.infer<typeof StreamlitAppsVersionsSchema>) => {
+ schema: StreamlitAppsVersionsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof StreamlitAppsVersionsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.StreamlitAppVersionList>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/subscriptions.ts b/services/mcp/src/tools/generated/subscriptions.ts
index 60b6b216c002..8c07054357fa 100644
--- a/services/mcp/src/tools/generated/subscriptions.ts
+++ b/services/mcp/src/tools/generated/subscriptions.ts
@@ -2,28 +2,20 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- SubscriptionsCreateBody,
- SubscriptionsDeliveriesListParams,
- SubscriptionsDeliveriesListQueryParams,
- SubscriptionsDeliveriesRetrieveParams,
- SubscriptionsDestroyParams,
- SubscriptionsListQueryParams,
- SubscriptionsPartialUpdateBody,
- SubscriptionsPartialUpdateParams,
- SubscriptionsRetrieveParams,
- SubscriptionsTestDeliveryCreateParams,
-} from '@/generated/subscriptions/api'
+import * as orvalSchemas from '@/generated/subscriptions/api'
import { castStringToInt } from '@/tools/cast-helpers'
import { withPostHogUrl, omitResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const SubscriptionsCreateSchema = SubscriptionsCreateBody
+const SubscriptionsCreateSchema = () => {
+ const SubscriptionsCreateBody = orvalSchemas.SubscriptionsCreateBody()
+ return SubscriptionsCreateBody
+}
-const subscriptionsCreate = (): ToolBase<typeof SubscriptionsCreateSchema, Schemas.Subscription> => ({
+const subscriptionsCreate = (): ToolBase<ReturnType<typeof SubscriptionsCreateSchema>, Schemas.Subscription> => ({
name: 'subscriptions-create',
- schema: SubscriptionsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof SubscriptionsCreateSchema>) => {
+ schema: SubscriptionsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SubscriptionsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.dashboard !== undefined) {
@@ -98,14 +90,17 @@ const subscriptionsCreate = (): ToolBase<typeof SubscriptionsCreateSchema, Schem
},
})
-const SubscriptionsDeleteSchema = SubscriptionsDestroyParams.omit({ project_id: true }).extend({
- id: z.preprocess(castStringToInt, SubscriptionsDestroyParams.shape['id']),
-})
+const SubscriptionsDeleteSchema = () => {
+ const SubscriptionsDestroyParams = orvalSchemas.SubscriptionsDestroyParams()
+ return SubscriptionsDestroyParams.omit({ project_id: true }).extend({
+ id: z.preprocess(castStringToInt, SubscriptionsDestroyParams.shape['id']),
+ })
+}
-const subscriptionsDelete = (): ToolBase<typeof SubscriptionsDeleteSchema, Schemas.Subscription> => ({
+const subscriptionsDelete = (): ToolBase<ReturnType<typeof SubscriptionsDeleteSchema>, Schemas.Subscription> => ({
name: 'subscriptions-delete',
- schema: SubscriptionsDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof SubscriptionsDeleteSchema>) => {
+ schema: SubscriptionsDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SubscriptionsDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Subscription>({
method: 'PATCH',
@@ -117,17 +112,21 @@ const subscriptionsDelete = (): ToolBase<typeof SubscriptionsDeleteSchema, Schem
},
})
-const SubscriptionsDeliveriesListSchema = SubscriptionsDeliveriesListParams.omit({ project_id: true }).extend(
- SubscriptionsDeliveriesListQueryParams.shape
-)
+const SubscriptionsDeliveriesListSchema = () => {
+ const SubscriptionsDeliveriesListParams = orvalSchemas.SubscriptionsDeliveriesListParams()
+ const SubscriptionsDeliveriesListQueryParams = orvalSchemas.SubscriptionsDeliveriesListQueryParams()
+ return SubscriptionsDeliveriesListParams.omit({ project_id: true }).extend(
+ SubscriptionsDeliveriesListQueryParams.shape
+ )
+}
const subscriptionsDeliveriesList = (): ToolBase<
- typeof SubscriptionsDeliveriesListSchema,
+ ReturnType<typeof SubscriptionsDeliveriesListSchema>,
WithPostHogUrl<Schemas.PaginatedSubscriptionDeliveryList>
> => ({
name: 'subscriptions-deliveries-list',
- schema: SubscriptionsDeliveriesListSchema,
- handler: async (context: Context, params: z.infer<typeof SubscriptionsDeliveriesListSchema>) => {
+ schema: SubscriptionsDeliveriesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SubscriptionsDeliveriesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedSubscriptionDeliveryList>({
method: 'GET',
@@ -154,15 +153,18 @@ const subscriptionsDeliveriesList = (): ToolBase<
},
})
-const SubscriptionsDeliveriesRetrieveSchema = SubscriptionsDeliveriesRetrieveParams.omit({ project_id: true })
+const SubscriptionsDeliveriesRetrieveSchema = () => {
+ const SubscriptionsDeliveriesRetrieveParams = orvalSchemas.SubscriptionsDeliveriesRetrieveParams()
+ return SubscriptionsDeliveriesRetrieveParams.omit({ project_id: true })
+}
const subscriptionsDeliveriesRetrieve = (): ToolBase<
- typeof SubscriptionsDeliveriesRetrieveSchema,
+ ReturnType<typeof SubscriptionsDeliveriesRetrieveSchema>,
Schemas.SubscriptionDelivery
> => ({
name: 'subscriptions-deliveries-retrieve',
- schema: SubscriptionsDeliveriesRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof SubscriptionsDeliveriesRetrieveSchema>) => {
+ schema: SubscriptionsDeliveriesRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SubscriptionsDeliveriesRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SubscriptionDelivery>({
method: 'GET',
@@ -178,15 +180,18 @@ const subscriptionsDeliveriesRetrieve = (): ToolBase<
},
})
-const SubscriptionsListSchema = SubscriptionsListQueryParams
+const SubscriptionsListSchema = () => {
+ const SubscriptionsListQueryParams = orvalSchemas.SubscriptionsListQueryParams()
+ return SubscriptionsListQueryParams
+}
const subscriptionsList = (): ToolBase<
- typeof SubscriptionsListSchema,
+ ReturnType<typeof SubscriptionsListSchema>,
WithPostHogUrl<Schemas.PaginatedSubscriptionList>
> => ({
name: 'subscriptions-list',
- schema: SubscriptionsListSchema,
- handler: async (context: Context, params: z.infer<typeof SubscriptionsListSchema>) => {
+ schema: SubscriptionsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SubscriptionsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedSubscriptionList>({
method: 'GET',
@@ -222,14 +227,19 @@ const subscriptionsList = (): ToolBase<
},
})
-const SubscriptionsPartialUpdateSchema = SubscriptionsPartialUpdateParams.omit({ project_id: true }).extend(
- SubscriptionsPartialUpdateBody.shape
-)
+const SubscriptionsPartialUpdateSchema = () => {
+ const SubscriptionsPartialUpdateBody = orvalSchemas.SubscriptionsPartialUpdateBody()
+ const SubscriptionsPartialUpdateParams = orvalSchemas.SubscriptionsPartialUpdateParams()
+ return SubscriptionsPartialUpdateParams.omit({ project_id: true }).extend(SubscriptionsPartialUpdateBody.shape)
+}
-const subscriptionsPartialUpdate = (): ToolBase<typeof SubscriptionsPartialUpdateSchema, Schemas.Subscription> => ({
+const subscriptionsPartialUpdate = (): ToolBase<
+ ReturnType<typeof SubscriptionsPartialUpdateSchema>,
+ Schemas.Subscription
+> => ({
name: 'subscriptions-partial-update',
- schema: SubscriptionsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof SubscriptionsPartialUpdateSchema>) => {
+ schema: SubscriptionsPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SubscriptionsPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.dashboard !== undefined) {
@@ -301,12 +311,15 @@ const subscriptionsPartialUpdate = (): ToolBase<typeof SubscriptionsPartialUpdat
},
})
-const SubscriptionsRetrieveSchema = SubscriptionsRetrieveParams.omit({ project_id: true })
+const SubscriptionsRetrieveSchema = () => {
+ const SubscriptionsRetrieveParams = orvalSchemas.SubscriptionsRetrieveParams()
+ return SubscriptionsRetrieveParams.omit({ project_id: true })
+}
-const subscriptionsRetrieve = (): ToolBase<typeof SubscriptionsRetrieveSchema, Schemas.Subscription> => ({
+const subscriptionsRetrieve = (): ToolBase<ReturnType<typeof SubscriptionsRetrieveSchema>, Schemas.Subscription> => ({
name: 'subscriptions-retrieve',
- schema: SubscriptionsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof SubscriptionsRetrieveSchema>) => {
+ schema: SubscriptionsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SubscriptionsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Subscription>({
method: 'GET',
@@ -317,12 +330,18 @@ const subscriptionsRetrieve = (): ToolBase<typeof SubscriptionsRetrieveSchema, S
},
})
-const SubscriptionsTestDeliveryCreateSchema = SubscriptionsTestDeliveryCreateParams.omit({ project_id: true })
+const SubscriptionsTestDeliveryCreateSchema = () => {
+ const SubscriptionsTestDeliveryCreateParams = orvalSchemas.SubscriptionsTestDeliveryCreateParams()
+ return SubscriptionsTestDeliveryCreateParams.omit({ project_id: true })
+}
-const subscriptionsTestDeliveryCreate = (): ToolBase<typeof SubscriptionsTestDeliveryCreateSchema, unknown> => ({
+const subscriptionsTestDeliveryCreate = (): ToolBase<
+ ReturnType<typeof SubscriptionsTestDeliveryCreateSchema>,
+ unknown
+> => ({
name: 'subscriptions-test-delivery-create',
- schema: SubscriptionsTestDeliveryCreateSchema,
- handler: async (context: Context, params: z.infer<typeof SubscriptionsTestDeliveryCreateSchema>) => {
+ schema: SubscriptionsTestDeliveryCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SubscriptionsTestDeliveryCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'POST',
diff --git a/services/mcp/src/tools/generated/surveys.ts b/services/mcp/src/tools/generated/surveys.ts
index ce515a889c0c..ce57282a2c82 100644
--- a/services/mcp/src/tools/generated/surveys.ts
+++ b/services/mcp/src/tools/generated/surveys.ts
@@ -2,85 +2,71 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- SurveysCreateBody,
- SurveysDestroyParams,
- SurveysGlobalStatsRetrieveQueryParams,
- SurveysLaunchParams,
- SurveysListQueryParams,
- SurveysPartialUpdateBody,
- SurveysPartialUpdateParams,
- SurveysResponsesListParams,
- SurveysResponsesListQueryParams,
- SurveysRetrieveParams,
- SurveysStatsRetrieveParams,
- SurveysStatsRetrieveQueryParams,
- SurveysStopParams,
- SurveysSummarizeResponsesCreateBody,
- SurveysSummarizeResponsesCreateParams,
- SurveysSummarizeResponsesCreateQueryParams,
-} from '@/generated/surveys/api'
+import * as orvalSchemas from '@/generated/surveys/api'
import { withUiApp } from '@/resources/ui-apps'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const SurveyCreateSchema = SurveysCreateBody.omit({
- linked_insight_id: true,
- targeting_flag_id: true,
- remove_targeting_flag: true,
- end_date: true,
- archived: true,
- iteration_start_dates: true,
- current_iteration: true,
- current_iteration_start_date: true,
- response_sampling_start_date: true,
- response_sampling_interval_type: true,
- response_sampling_interval: true,
- response_sampling_limit: true,
- response_sampling_daily_limits: true,
- base_language: true,
- _create_in_folder: true,
-}).extend({
- type: SurveysCreateBody.shape['type'].describe(
- 'Survey type. Use popover for most in-app surveys, widget for always-available feedback entrypoints, external_survey for hosted forms with a shareable public URL, and api only for headless custom implementations.'
- ),
- schedule: SurveysCreateBody.shape['schedule'].describe(
- 'Survey scheduling behavior. Omit this to use the default once behavior. Use recurring only when the user explicitly asks for a repeated schedule.'
- ),
- questions: SurveysCreateBody.shape['questions'].describe(
- 'Complete survey question list. Prefer 1-3 questions unless the user explicitly asks for a longer survey. Use rating questions for NPS/CSAT, open for freeform feedback, and choice questions when the user wants structured answers. Questions can include inline translations on each question.'
- ),
- conditions: SurveysCreateBody.shape['conditions'].describe(
- 'Display conditions for in-app surveys, such as URL matching, event triggers, device filters, or linked flag variants. To target people, groups, or cohorts by properties, use targeting_flag_filters instead. Do not use URL, selector, event, device, or linkedFlagVariant conditions for external_survey forms.'
- ),
- start_date: SurveysCreateBody.shape['start_date'].describe(
- 'Setting this launches the survey immediately. Leave unset unless the user explicitly asks to launch now.'
- ),
- linked_flag_id: SurveysCreateBody.shape['linked_flag_id'].describe(
- 'Feature flag ID linked to this survey. Use only when the user explicitly wants the survey linked to a feature flag. Resolve the flag ID first, preferably with SQL in v2.'
- ),
- targeting_flag_filters: SurveysCreateBody.shape['targeting_flag_filters'].describe(
- 'Target an in-app survey to a subset of users by person, group, or cohort properties. Pass one or more rules in groups[].properties[], each with key, value, operator, and an optional type. Use this instead of conditions for property targeting. Do not use this for external_survey forms.'
- ),
- enable_iframe_embedding: SurveysCreateBody.shape['enable_iframe_embedding'].describe(
- 'Allows an external_survey form to be embedded in an iframe. Use only when the user explicitly asks for iframe embedding.'
- ),
- translations: SurveysCreateBody.shape['translations'].describe(
- "Optional survey-level translations keyed by language code. Use for translated survey name, description, and thank-you message fields. Question text translations belong inside each question's translations object."
- ),
- form_content: SurveysCreateBody.shape['form_content'].describe(
- 'Optional hosted-form content configuration for external_survey forms. Only include this when the user explicitly asks to customize the hosted form content beyond the standard question flow.'
- ),
-})
+const SurveyCreateSchema = () => {
+ const SurveysCreateBody = orvalSchemas.SurveysCreateBody()
+ return SurveysCreateBody.omit({
+ linked_insight_id: true,
+ targeting_flag_id: true,
+ remove_targeting_flag: true,
+ end_date: true,
+ archived: true,
+ iteration_start_dates: true,
+ current_iteration: true,
+ current_iteration_start_date: true,
+ response_sampling_start_date: true,
+ response_sampling_interval_type: true,
+ response_sampling_interval: true,
+ response_sampling_limit: true,
+ response_sampling_daily_limits: true,
+ base_language: true,
+ _create_in_folder: true,
+ }).extend({
+ type: SurveysCreateBody.shape['type'].describe(
+ 'Survey type. Use popover for most in-app surveys, widget for always-available feedback entrypoints, external_survey for hosted forms with a shareable public URL, and api only for headless custom implementations.'
+ ),
+ schedule: SurveysCreateBody.shape['schedule'].describe(
+ 'Survey scheduling behavior. Omit this to use the default once behavior. Use recurring only when the user explicitly asks for a repeated schedule.'
+ ),
+ questions: SurveysCreateBody.shape['questions'].describe(
+ 'Complete survey question list. Prefer 1-3 questions unless the user explicitly asks for a longer survey. Use rating questions for NPS/CSAT, open for freeform feedback, and choice questions when the user wants structured answers. Questions can include inline translations on each question.'
+ ),
+ conditions: SurveysCreateBody.shape['conditions'].describe(
+ 'Display conditions for in-app surveys, such as URL matching, event triggers, device filters, or linked flag variants. To target people, groups, or cohorts by properties, use targeting_flag_filters instead. Do not use URL, selector, event, device, or linkedFlagVariant conditions for external_survey forms.'
+ ),
+ start_date: SurveysCreateBody.shape['start_date'].describe(
+ 'Setting this launches the survey immediately. Leave unset unless the user explicitly asks to launch now.'
+ ),
+ linked_flag_id: SurveysCreateBody.shape['linked_flag_id'].describe(
+ 'Feature flag ID linked to this survey. Use only when the user explicitly wants the survey linked to a feature flag. Resolve the flag ID first, preferably with SQL in v2.'
+ ),
+ targeting_flag_filters: SurveysCreateBody.shape['targeting_flag_filters'].describe(
+ 'Target an in-app survey to a subset of users by person, group, or cohort properties. Pass one or more rules in groups[].properties[], each with key, value, operator, and an optional type. Use this instead of conditions for property targeting. Do not use this for external_survey forms.'
+ ),
+ enable_iframe_embedding: SurveysCreateBody.shape['enable_iframe_embedding'].describe(
+ 'Allows an external_survey form to be embedded in an iframe. Use only when the user explicitly asks for iframe embedding.'
+ ),
+ translations: SurveysCreateBody.shape['translations'].describe(
+ "Optional survey-level translations keyed by language code. Use for translated survey name, description, and thank-you message fields. Question text translations belong inside each question's translations object."
+ ),
+ form_content: SurveysCreateBody.shape['form_content'].describe(
+ 'Optional hosted-form content configuration for external_survey forms. Only include this when the user explicitly asks to customize the hosted form content beyond the standard question flow.'
+ ),
+ })
+}
const surveyCreate = (): ToolBase<
- typeof SurveyCreateSchema,
+ ReturnType<typeof SurveyCreateSchema>,
WithPostHogUrl<Schemas.SurveySerializerCreateUpdateOnly>
> =>
withUiApp('survey', {
name: 'survey-create',
- schema: SurveyCreateSchema,
- handler: async (context: Context, params: z.infer<typeof SurveyCreateSchema>) => {
+ schema: SurveyCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SurveyCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -143,12 +129,15 @@ const surveyCreate = (): ToolBase<
},
})
-const SurveyDeleteSchema = SurveysDestroyParams.omit({ project_id: true })
+const SurveyDeleteSchema = () => {
+ const SurveysDestroyParams = orvalSchemas.SurveysDestroyParams()
+ return SurveysDestroyParams.omit({ project_id: true })
+}
-const surveyDelete = (): ToolBase<typeof SurveyDeleteSchema, Schemas.SurveySerializerCreateUpdateOnly> => ({
+const surveyDelete = (): ToolBase<ReturnType<typeof SurveyDeleteSchema>, Schemas.SurveySerializerCreateUpdateOnly> => ({
name: 'survey-delete',
- schema: SurveyDeleteSchema,
- handler: async (context: Context, params: z.infer<typeof SurveyDeleteSchema>) => {
+ schema: SurveyDeleteSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SurveyDeleteSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SurveySerializerCreateUpdateOnly>({
method: 'PATCH',
@@ -159,13 +148,16 @@ const surveyDelete = (): ToolBase<typeof SurveyDeleteSchema, Schemas.SurveySeria
},
})
-const SurveyGetSchema = SurveysRetrieveParams.omit({ project_id: true })
+const SurveyGetSchema = () => {
+ const SurveysRetrieveParams = orvalSchemas.SurveysRetrieveParams()
+ return SurveysRetrieveParams.omit({ project_id: true })
+}
-const surveyGet = (): ToolBase<typeof SurveyGetSchema, WithPostHogUrl<Schemas.Survey>> =>
+const surveyGet = (): ToolBase<ReturnType<typeof SurveyGetSchema>, WithPostHogUrl<Schemas.Survey>> =>
withUiApp('survey', {
name: 'survey-get',
- schema: SurveyGetSchema,
- handler: async (context: Context, params: z.infer<typeof SurveyGetSchema>) => {
+ schema: SurveyGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SurveyGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Survey>({
method: 'GET',
@@ -175,13 +167,16 @@ const surveyGet = (): ToolBase<typeof SurveyGetSchema, WithPostHogUrl<Schemas.Su
},
})
-const SurveyLaunchSchema = SurveysLaunchParams.omit({ project_id: true })
+const SurveyLaunchSchema = () => {
+ const SurveysLaunchParams = orvalSchemas.SurveysLaunchParams()
+ return SurveysLaunchParams.omit({ project_id: true })
+}
-const surveyLaunch = (): ToolBase<typeof SurveyLaunchSchema, WithPostHogUrl<Schemas.Survey>> =>
+const surveyLaunch = (): ToolBase<ReturnType<typeof SurveyLaunchSchema>, WithPostHogUrl<Schemas.Survey>> =>
withUiApp('survey', {
name: 'survey-launch',
- schema: SurveyLaunchSchema,
- handler: async (context: Context, params: z.infer<typeof SurveyLaunchSchema>) => {
+ schema: SurveyLaunchSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SurveyLaunchSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Survey>({
method: 'POST',
@@ -191,15 +186,17 @@ const surveyLaunch = (): ToolBase<typeof SurveyLaunchSchema, WithPostHogUrl<Sche
},
})
-const SurveyStatsSchema = SurveysStatsRetrieveParams.omit({ project_id: true }).extend(
- SurveysStatsRetrieveQueryParams.shape
-)
+const SurveyStatsSchema = () => {
+ const SurveysStatsRetrieveParams = orvalSchemas.SurveysStatsRetrieveParams()
+ const SurveysStatsRetrieveQueryParams = orvalSchemas.SurveysStatsRetrieveQueryParams()
+ return SurveysStatsRetrieveParams.omit({ project_id: true }).extend(SurveysStatsRetrieveQueryParams.shape)
+}
-const surveyStats = (): ToolBase<typeof SurveyStatsSchema, WithPostHogUrl<Schemas.SurveyStatsResponse>> =>
+const surveyStats = (): ToolBase<ReturnType<typeof SurveyStatsSchema>, WithPostHogUrl<Schemas.SurveyStatsResponse>> =>
withUiApp('survey-stats', {
name: 'survey-stats',
- schema: SurveyStatsSchema,
- handler: async (context: Context, params: z.infer<typeof SurveyStatsSchema>) => {
+ schema: SurveyStatsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SurveyStatsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SurveyStatsResponse>({
method: 'GET',
@@ -214,13 +211,16 @@ const surveyStats = (): ToolBase<typeof SurveyStatsSchema, WithPostHogUrl<Schema
},
})
-const SurveyStopSchema = SurveysStopParams.omit({ project_id: true })
+const SurveyStopSchema = () => {
+ const SurveysStopParams = orvalSchemas.SurveysStopParams()
+ return SurveysStopParams.omit({ project_id: true })
+}
-const surveyStop = (): ToolBase<typeof SurveyStopSchema, WithPostHogUrl<Schemas.Survey>> =>
+const surveyStop = (): ToolBase<ReturnType<typeof SurveyStopSchema>, WithPostHogUrl<Schemas.Survey>> =>
withUiApp('survey', {
name: 'survey-stop',
- schema: SurveyStopSchema,
- handler: async (context: Context, params: z.infer<typeof SurveyStopSchema>) => {
+ schema: SurveyStopSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SurveyStopSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Survey>({
method: 'POST',
@@ -230,48 +230,52 @@ const surveyStop = (): ToolBase<typeof SurveyStopSchema, WithPostHogUrl<Schemas.
},
})
-const SurveyUpdateSchema = SurveysPartialUpdateParams.omit({ project_id: true })
- .extend(
- SurveysPartialUpdateBody.omit({
- linked_insight_id: true,
- iteration_start_dates: true,
- current_iteration: true,
- current_iteration_start_date: true,
- response_sampling_start_date: true,
- response_sampling_interval_type: true,
- response_sampling_interval: true,
- response_sampling_limit: true,
- response_sampling_daily_limits: true,
- base_language: true,
- _create_in_folder: true,
- }).shape
- )
- .extend({
- questions: SurveysPartialUpdateBody.shape['questions'].describe(
- "Complete replacement question list. Existing question IDs are tied to response data and must be preserved. Before sending this field, fetch the survey first, modify the existing question objects in place, keep every unchanged or edited question's id, and include the complete intended ordered question list. New questions should omit id. Do not regenerate existing questions from scratch."
- ),
- conditions: SurveysPartialUpdateBody.shape['conditions'].describe(
- 'Complete replacement display conditions object. Do not provide this field unless changing display targeting. Use targeting_flag_filters for person, group, or cohort property targeting. Preserve existing URL, selector, event, device, wait-period, and linked flag variant conditions unless explicitly changing them.'
- ),
- targeting_flag_filters: SurveysPartialUpdateBody.shape['targeting_flag_filters'].describe(
- "Update an in-app survey's person, group, or cohort property targeting. Pass rules in groups[].properties[], each with key, value, operator, and an optional type. Use this instead of conditions for property targeting. Complete replacement: fetch the survey first, start from targeting_flag.filters, and send the full groups list — omitted groups are removed. Do not use this for external_survey forms."
- ),
- translations: SurveysPartialUpdateBody.shape['translations'].describe(
- 'Complete replacement survey-level translations object. Do not provide this field unless changing translations. Preserve existing language keys and translated fields that should remain. Use null only when the user explicitly asks to remove survey-level translations.'
- ),
- form_content: SurveysPartialUpdateBody.shape['form_content'].describe(
- 'Hosted-form content configuration for external_survey forms. Do not provide this field unless editing hosted-form content. Preserve existing content fields that should remain.'
- ),
- })
+const SurveyUpdateSchema = () => {
+ const SurveysPartialUpdateBody = orvalSchemas.SurveysPartialUpdateBody()
+ const SurveysPartialUpdateParams = orvalSchemas.SurveysPartialUpdateParams()
+ return SurveysPartialUpdateParams.omit({ project_id: true })
+ .extend(
+ SurveysPartialUpdateBody.omit({
+ linked_insight_id: true,
+ iteration_start_dates: true,
+ current_iteration: true,
+ current_iteration_start_date: true,
+ response_sampling_start_date: true,
+ response_sampling_interval_type: true,
+ response_sampling_interval: true,
+ response_sampling_limit: true,
+ response_sampling_daily_limits: true,
+ base_language: true,
+ _create_in_folder: true,
+ }).shape
+ )
+ .extend({
+ questions: SurveysPartialUpdateBody.shape['questions'].describe(
+ "Complete replacement question list. Existing question IDs are tied to response data and must be preserved. Before sending this field, fetch the survey first, modify the existing question objects in place, keep every unchanged or edited question's id, and include the complete intended ordered question list. New questions should omit id. Do not regenerate existing questions from scratch."
+ ),
+ conditions: SurveysPartialUpdateBody.shape['conditions'].describe(
+ 'Complete replacement display conditions object. Do not provide this field unless changing display targeting. Use targeting_flag_filters for person, group, or cohort property targeting. Preserve existing URL, selector, event, device, wait-period, and linked flag variant conditions unless explicitly changing them.'
+ ),
+ targeting_flag_filters: SurveysPartialUpdateBody.shape['targeting_flag_filters'].describe(
+ "Update an in-app survey's person, group, or cohort property targeting. Pass rules in groups[].properties[], each with key, value, operator, and an optional type. Use this instead of conditions for property targeting. Complete replacement: fetch the survey first, start from targeting_flag.filters, and send the full groups list — omitted groups are removed. Do not use this for external_survey forms."
+ ),
+ translations: SurveysPartialUpdateBody.shape['translations'].describe(
+ 'Complete replacement survey-level translations object. Do not provide this field unless changing translations. Preserve existing language keys and translated fields that should remain. Use null only when the user explicitly asks to remove survey-level translations.'
+ ),
+ form_content: SurveysPartialUpdateBody.shape['form_content'].describe(
+ 'Hosted-form content configuration for external_survey forms. Do not provide this field unless editing hosted-form content. Preserve existing content fields that should remain.'
+ ),
+ })
+}
const surveyUpdate = (): ToolBase<
- typeof SurveyUpdateSchema,
+ ReturnType<typeof SurveyUpdateSchema>,
WithPostHogUrl<Schemas.SurveySerializerCreateUpdateOnly>
> =>
withUiApp('survey', {
name: 'survey-update',
- schema: SurveyUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof SurveyUpdateSchema>) => {
+ schema: SurveyUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SurveyUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -346,13 +350,19 @@ const surveyUpdate = (): ToolBase<
},
})
-const SurveysGetAllSchema = SurveysListQueryParams
+const SurveysGetAllSchema = () => {
+ const SurveysListQueryParams = orvalSchemas.SurveysListQueryParams()
+ return SurveysListQueryParams
+}
-const surveysGetAll = (): ToolBase<typeof SurveysGetAllSchema, WithPostHogUrl<Schemas.PaginatedSurveyList>> =>
+const surveysGetAll = (): ToolBase<
+ ReturnType<typeof SurveysGetAllSchema>,
+ WithPostHogUrl<Schemas.PaginatedSurveyList>
+> =>
withUiApp('survey-list', {
name: 'surveys-get-all',
- schema: SurveysGetAllSchema,
- handler: async (context: Context, params: z.infer<typeof SurveysGetAllSchema>) => {
+ schema: SurveysGetAllSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SurveysGetAllSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedSurveyList>({
method: 'GET',
@@ -381,13 +391,19 @@ const surveysGetAll = (): ToolBase<typeof SurveysGetAllSchema, WithPostHogUrl<Sc
},
})
-const SurveysGlobalStatsSchema = SurveysGlobalStatsRetrieveQueryParams
+const SurveysGlobalStatsSchema = () => {
+ const SurveysGlobalStatsRetrieveQueryParams = orvalSchemas.SurveysGlobalStatsRetrieveQueryParams()
+ return SurveysGlobalStatsRetrieveQueryParams
+}
-const surveysGlobalStats = (): ToolBase<typeof SurveysGlobalStatsSchema, Schemas.SurveyGlobalStatsResponse> =>
+const surveysGlobalStats = (): ToolBase<
+ ReturnType<typeof SurveysGlobalStatsSchema>,
+ Schemas.SurveyGlobalStatsResponse
+> =>
withUiApp('survey-global-stats', {
name: 'surveys-global-stats',
- schema: SurveysGlobalStatsSchema,
- handler: async (context: Context, params: z.infer<typeof SurveysGlobalStatsSchema>) => {
+ schema: SurveysGlobalStatsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SurveysGlobalStatsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SurveyGlobalStatsResponse>({
method: 'GET',
@@ -401,15 +417,17 @@ const surveysGlobalStats = (): ToolBase<typeof SurveysGlobalStatsSchema, Schemas
},
})
-const SurveysResponsesListSchema = SurveysResponsesListParams.omit({ project_id: true }).extend(
- SurveysResponsesListQueryParams.shape
-)
+const SurveysResponsesListSchema = () => {
+ const SurveysResponsesListParams = orvalSchemas.SurveysResponsesListParams()
+ const SurveysResponsesListQueryParams = orvalSchemas.SurveysResponsesListQueryParams()
+ return SurveysResponsesListParams.omit({ project_id: true }).extend(SurveysResponsesListQueryParams.shape)
+}
-const surveysResponsesList = (): ToolBase<typeof SurveysResponsesListSchema, Schemas.SurveyResponsesList> =>
+const surveysResponsesList = (): ToolBase<ReturnType<typeof SurveysResponsesListSchema>, Schemas.SurveyResponsesList> =>
withUiApp('survey-stats', {
name: 'surveys-responses-list',
- schema: SurveysResponsesListSchema,
- handler: async (context: Context, params: z.infer<typeof SurveysResponsesListSchema>) => {
+ schema: SurveysResponsesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SurveysResponsesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SurveyResponsesList>({
method: 'GET',
@@ -429,14 +447,22 @@ const surveysResponsesList = (): ToolBase<typeof SurveysResponsesListSchema, Sch
},
})
-const SurveysSummarizeResponsesCreateSchema = SurveysSummarizeResponsesCreateParams.omit({ project_id: true })
- .extend(SurveysSummarizeResponsesCreateQueryParams.shape)
- .extend(SurveysSummarizeResponsesCreateBody.shape)
+const SurveysSummarizeResponsesCreateSchema = () => {
+ const SurveysSummarizeResponsesCreateBody = orvalSchemas.SurveysSummarizeResponsesCreateBody()
+ const SurveysSummarizeResponsesCreateParams = orvalSchemas.SurveysSummarizeResponsesCreateParams()
+ const SurveysSummarizeResponsesCreateQueryParams = orvalSchemas.SurveysSummarizeResponsesCreateQueryParams()
+ return SurveysSummarizeResponsesCreateParams.omit({ project_id: true })
+ .extend(SurveysSummarizeResponsesCreateQueryParams.shape)
+ .extend(SurveysSummarizeResponsesCreateBody.shape)
+}
-const surveysSummarizeResponsesCreate = (): ToolBase<typeof SurveysSummarizeResponsesCreateSchema, unknown> => ({
+const surveysSummarizeResponsesCreate = (): ToolBase<
+ ReturnType<typeof SurveysSummarizeResponsesCreateSchema>,
+ unknown
+> => ({
name: 'surveys-summarize-responses-create',
- schema: SurveysSummarizeResponsesCreateSchema,
- handler: async (context: Context, params: z.infer<typeof SurveysSummarizeResponsesCreateSchema>) => {
+ schema: SurveysSummarizeResponsesCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof SurveysSummarizeResponsesCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.force_refresh !== undefined) {
diff --git a/services/mcp/src/tools/generated/tasks.ts b/services/mcp/src/tools/generated/tasks.ts
index 215c6d0e3a2d..11d013442182 100644
--- a/services/mcp/src/tools/generated/tasks.ts
+++ b/services/mcp/src/tools/generated/tasks.ts
@@ -2,33 +2,7 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- LoopsCreateBody,
- LoopsDestroyParams,
- LoopsListQueryParams,
- LoopsPartialUpdateBody,
- LoopsPartialUpdateParams,
- LoopsPreviewCreateBody,
- LoopsPreviewCreateParams,
- LoopsRetrieveParams,
- LoopsRunCreateParams,
- LoopsRunsRetrieveParams,
- LoopsRunsRetrieveQueryParams,
- TaskChannelsCreateBody,
- TaskChannelsInstructionsRetrieveParams,
- TaskChannelsInstructionsUpdateBody,
- TaskChannelsInstructionsUpdateParams,
- TaskChannelsListQueryParams,
- TaskChannelsRetrieveParams,
- TasksCreateBody,
- TasksListQueryParams,
- TasksRetrieveParams,
- TasksRunsListParams,
- TasksRunsListQueryParams,
- TasksRunsRetrieveParams,
- TasksRunsSessionLogsRetrieveParams,
- TasksRunsSessionLogsRetrieveQueryParams,
-} from '@/generated/tasks/api'
+import * as orvalSchemas from '@/generated/tasks/api'
import { ChannelInstructionsBaseVersionSchema } from '@/schema/tool-inputs'
import { getConfirmedActionRuntime } from '@/tools/confirmed-action-registry'
import {
@@ -39,12 +13,15 @@ import {
import { withPostHogUrl, pickResponseFields, omitResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const ChannelCreateSchema = TaskChannelsCreateBody
+const ChannelCreateSchema = () => {
+ const TaskChannelsCreateBody = orvalSchemas.TaskChannelsCreateBody()
+ return TaskChannelsCreateBody
+}
-const channelCreate = (): ToolBase<typeof ChannelCreateSchema, Schemas.ChannelDTO> => ({
+const channelCreate = (): ToolBase<ReturnType<typeof ChannelCreateSchema>, Schemas.ChannelDTO> => ({
name: 'channel-create',
- schema: ChannelCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ChannelCreateSchema>) => {
+ schema: ChannelCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ChannelCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -62,17 +39,22 @@ const channelCreate = (): ToolBase<typeof ChannelCreateSchema, Schemas.ChannelDT
},
})
-const ChannelInstructionsRetrieveSchema = TaskChannelsInstructionsRetrieveParams.omit({ project_id: true }).extend({
- id: TaskChannelsInstructionsRetrieveParams.shape['id'].describe('ID of the channel whose instructions to read.'),
-})
+const ChannelInstructionsRetrieveSchema = () => {
+ const TaskChannelsInstructionsRetrieveParams = orvalSchemas.TaskChannelsInstructionsRetrieveParams()
+ return TaskChannelsInstructionsRetrieveParams.omit({ project_id: true }).extend({
+ id: TaskChannelsInstructionsRetrieveParams.shape['id'].describe(
+ 'ID of the channel whose instructions to read.'
+ ),
+ })
+}
const channelInstructionsRetrieve = (): ToolBase<
- typeof ChannelInstructionsRetrieveSchema,
+ ReturnType<typeof ChannelInstructionsRetrieveSchema>,
Schemas.ChannelInstructionsDTO
> => ({
name: 'channel-instructions-retrieve',
- schema: ChannelInstructionsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ChannelInstructionsRetrieveSchema>) => {
+ schema: ChannelInstructionsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ChannelInstructionsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ChannelInstructionsDTO>({
method: 'GET',
@@ -82,22 +64,26 @@ const channelInstructionsRetrieve = (): ToolBase<
},
})
-const ChannelInstructionsUpdateSchema = TaskChannelsInstructionsUpdateParams.omit({ project_id: true })
- .extend(TaskChannelsInstructionsUpdateBody.shape)
- .extend({
- id: TaskChannelsInstructionsUpdateParams.shape['id'].describe(
- 'ID of the channel whose instructions to update.'
- ),
- base_version: ChannelInstructionsBaseVersionSchema,
- })
+const ChannelInstructionsUpdateSchema = () => {
+ const TaskChannelsInstructionsUpdateBody = orvalSchemas.TaskChannelsInstructionsUpdateBody()
+ const TaskChannelsInstructionsUpdateParams = orvalSchemas.TaskChannelsInstructionsUpdateParams()
+ return TaskChannelsInstructionsUpdateParams.omit({ project_id: true })
+ .extend(TaskChannelsInstructionsUpdateBody.shape)
+ .extend({
+ id: TaskChannelsInstructionsUpdateParams.shape['id'].describe(
+ 'ID of the channel whose instructions to update.'
+ ),
+ base_version: ChannelInstructionsBaseVersionSchema,
+ })
+}
const channelInstructionsUpdate = (): ToolBase<
- typeof ChannelInstructionsUpdateSchema,
+ ReturnType<typeof ChannelInstructionsUpdateSchema>,
Schemas.ChannelInstructionsDTO
> => ({
name: 'channel-instructions-update',
- schema: ChannelInstructionsUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ChannelInstructionsUpdateSchema>) => {
+ schema: ChannelInstructionsUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ChannelInstructionsUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.content !== undefined) {
@@ -115,12 +101,15 @@ const channelInstructionsUpdate = (): ToolBase<
},
})
-const ChannelListSchema = TaskChannelsListQueryParams
+const ChannelListSchema = () => {
+ const TaskChannelsListQueryParams = orvalSchemas.TaskChannelsListQueryParams()
+ return TaskChannelsListQueryParams
+}
-const channelList = (): ToolBase<typeof ChannelListSchema, Schemas.PaginatedChannelDTOList> => ({
+const channelList = (): ToolBase<ReturnType<typeof ChannelListSchema>, Schemas.PaginatedChannelDTOList> => ({
name: 'channel-list',
- schema: ChannelListSchema,
- handler: async (context: Context, params: z.infer<typeof ChannelListSchema>) => {
+ schema: ChannelListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ChannelListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedChannelDTOList>({
method: 'GET',
@@ -134,14 +123,17 @@ const channelList = (): ToolBase<typeof ChannelListSchema, Schemas.PaginatedChan
},
})
-const ChannelRetrieveSchema = TaskChannelsRetrieveParams.omit({ project_id: true }).extend({
- id: TaskChannelsRetrieveParams.shape['id'].describe('ID of the channel to read.'),
-})
+const ChannelRetrieveSchema = () => {
+ const TaskChannelsRetrieveParams = orvalSchemas.TaskChannelsRetrieveParams()
+ return TaskChannelsRetrieveParams.omit({ project_id: true }).extend({
+ id: TaskChannelsRetrieveParams.shape['id'].describe('ID of the channel to read.'),
+ })
+}
-const channelRetrieve = (): ToolBase<typeof ChannelRetrieveSchema, Schemas.ChannelDTO> => ({
+const channelRetrieve = (): ToolBase<ReturnType<typeof ChannelRetrieveSchema>, Schemas.ChannelDTO> => ({
name: 'channel-retrieve',
- schema: ChannelRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ChannelRetrieveSchema>) => {
+ schema: ChannelRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ChannelRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ChannelDTO>({
method: 'GET',
@@ -151,17 +143,20 @@ const channelRetrieve = (): ToolBase<typeof ChannelRetrieveSchema, Schemas.Chann
},
})
-const LoopChannelInstructionsRetrieveSchema = TaskChannelsInstructionsRetrieveParams.omit({ project_id: true }).extend({
- id: TaskChannelsInstructionsRetrieveParams.shape['id'].describe("ID of the loop's context channel."),
-})
+const LoopChannelInstructionsRetrieveSchema = () => {
+ const TaskChannelsInstructionsRetrieveParams = orvalSchemas.TaskChannelsInstructionsRetrieveParams()
+ return TaskChannelsInstructionsRetrieveParams.omit({ project_id: true }).extend({
+ id: TaskChannelsInstructionsRetrieveParams.shape['id'].describe("ID of the loop's context channel."),
+ })
+}
const loopChannelInstructionsRetrieve = (): ToolBase<
- typeof LoopChannelInstructionsRetrieveSchema,
+ ReturnType<typeof LoopChannelInstructionsRetrieveSchema>,
Schemas.ChannelInstructionsDTO
> => ({
name: 'loop-channel-instructions-retrieve',
- schema: LoopChannelInstructionsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof LoopChannelInstructionsRetrieveSchema>) => {
+ schema: LoopChannelInstructionsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LoopChannelInstructionsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ChannelInstructionsDTO>({
method: 'GET',
@@ -171,20 +166,24 @@ const loopChannelInstructionsRetrieve = (): ToolBase<
},
})
-const LoopChannelInstructionsUpdateSchema = TaskChannelsInstructionsUpdateParams.omit({ project_id: true })
- .extend(TaskChannelsInstructionsUpdateBody.shape)
- .extend({
- id: TaskChannelsInstructionsUpdateParams.shape['id'].describe("ID of the loop's context channel."),
- base_version: ChannelInstructionsBaseVersionSchema,
- })
+const LoopChannelInstructionsUpdateSchema = () => {
+ const TaskChannelsInstructionsUpdateBody = orvalSchemas.TaskChannelsInstructionsUpdateBody()
+ const TaskChannelsInstructionsUpdateParams = orvalSchemas.TaskChannelsInstructionsUpdateParams()
+ return TaskChannelsInstructionsUpdateParams.omit({ project_id: true })
+ .extend(TaskChannelsInstructionsUpdateBody.shape)
+ .extend({
+ id: TaskChannelsInstructionsUpdateParams.shape['id'].describe("ID of the loop's context channel."),
+ base_version: ChannelInstructionsBaseVersionSchema,
+ })
+}
const loopChannelInstructionsUpdate = (): ToolBase<
- typeof LoopChannelInstructionsUpdateSchema,
+ ReturnType<typeof LoopChannelInstructionsUpdateSchema>,
Schemas.ChannelInstructionsDTO
> => ({
name: 'loop-channel-instructions-update',
- schema: LoopChannelInstructionsUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof LoopChannelInstructionsUpdateSchema>) => {
+ schema: LoopChannelInstructionsUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LoopChannelInstructionsUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.content !== undefined) {
@@ -202,7 +201,10 @@ const loopChannelInstructionsUpdate = (): ToolBase<
},
})
-const LoopsCreateSchema = LoopsCreateBody
+const LoopsCreateSchema = () => {
+ const LoopsCreateBody = orvalSchemas.LoopsCreateBody()
+ return LoopsCreateBody
+}
const LoopsCreateSchemaExecute = z.strictObject({
confirmation_hash: z
@@ -211,10 +213,10 @@ const LoopsCreateSchemaExecute = z.strictObject({
confirmation: z.string().describe('The literal string "confirm", typed by the user in chat. Required to proceed.'),
})
-const loopsCreatePrepare = (): ToolBase<typeof LoopsCreateSchema, PrepareConfirmedActionResult> => ({
+const loopsCreatePrepare = (): ToolBase<ReturnType<typeof LoopsCreateSchema>, PrepareConfirmedActionResult> => ({
name: 'loops-create-prepare',
- schema: LoopsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LoopsCreateSchema>) => {
+ schema: LoopsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LoopsCreateSchema>>) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
return await prepareConfirmedAction(context, {
@@ -236,7 +238,7 @@ const loopsCreateExecute = (): ToolBase<typeof LoopsCreateSchemaExecute, Schemas
handler: async (context: Context, confirmationParams: z.infer<typeof LoopsCreateSchemaExecute>) => {
const __runtime = getConfirmedActionRuntime()
const __scopeProjectId = await context.stateManager.getProjectId()
- const __guard = await executeConfirmedAction<z.infer<typeof LoopsCreateSchema>>(context, {
+ const __guard = await executeConfirmedAction<z.infer<ReturnType<typeof LoopsCreateSchema>>>(context, {
incomingArgs: confirmationParams,
purpose: 'loops-create',
codec: __runtime.codec,
@@ -310,12 +312,15 @@ const loopsCreateExecute = (): ToolBase<typeof LoopsCreateSchemaExecute, Schemas
},
})
-const LoopsDestroySchema = LoopsDestroyParams.omit({ project_id: true })
+const LoopsDestroySchema = () => {
+ const LoopsDestroyParams = orvalSchemas.LoopsDestroyParams()
+ return LoopsDestroyParams.omit({ project_id: true })
+}
-const loopsDestroy = (): ToolBase<typeof LoopsDestroySchema, unknown> => ({
+const loopsDestroy = (): ToolBase<ReturnType<typeof LoopsDestroySchema>, unknown> => ({
name: 'loops-destroy',
- schema: LoopsDestroySchema,
- handler: async (context: Context, params: z.infer<typeof LoopsDestroySchema>) => {
+ schema: LoopsDestroySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LoopsDestroySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -325,12 +330,15 @@ const loopsDestroy = (): ToolBase<typeof LoopsDestroySchema, unknown> => ({
},
})
-const LoopsListSchema = LoopsListQueryParams
+const LoopsListSchema = () => {
+ const LoopsListQueryParams = orvalSchemas.LoopsListQueryParams()
+ return LoopsListQueryParams
+}
-const loopsList = (): ToolBase<typeof LoopsListSchema, WithPostHogUrl<Schemas.PaginatedLoopDTOList>> => ({
+const loopsList = (): ToolBase<ReturnType<typeof LoopsListSchema>, WithPostHogUrl<Schemas.PaginatedLoopDTOList>> => ({
name: 'loops-list',
- schema: LoopsListSchema,
- handler: async (context: Context, params: z.infer<typeof LoopsListSchema>) => {
+ schema: LoopsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LoopsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedLoopDTOList>({
method: 'GET',
@@ -344,14 +352,16 @@ const loopsList = (): ToolBase<typeof LoopsListSchema, WithPostHogUrl<Schemas.Pa
},
})
-const LoopsPartialUpdateSchema = LoopsPartialUpdateParams.omit({ project_id: true }).extend(
- LoopsPartialUpdateBody.shape
-)
+const LoopsPartialUpdateSchema = () => {
+ const LoopsPartialUpdateBody = orvalSchemas.LoopsPartialUpdateBody()
+ const LoopsPartialUpdateParams = orvalSchemas.LoopsPartialUpdateParams()
+ return LoopsPartialUpdateParams.omit({ project_id: true }).extend(LoopsPartialUpdateBody.shape)
+}
-const loopsPartialUpdate = (): ToolBase<typeof LoopsPartialUpdateSchema, Schemas.LoopDTO> => ({
+const loopsPartialUpdate = (): ToolBase<ReturnType<typeof LoopsPartialUpdateSchema>, Schemas.LoopDTO> => ({
name: 'loops-partial-update',
- schema: LoopsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof LoopsPartialUpdateSchema>) => {
+ schema: LoopsPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LoopsPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -414,14 +424,16 @@ const loopsPartialUpdate = (): ToolBase<typeof LoopsPartialUpdateSchema, Schemas
},
})
-const LoopsPreviewCreateSchema = LoopsPreviewCreateParams.omit({ project_id: true }).extend(
- LoopsPreviewCreateBody.shape
-)
+const LoopsPreviewCreateSchema = () => {
+ const LoopsPreviewCreateBody = orvalSchemas.LoopsPreviewCreateBody()
+ const LoopsPreviewCreateParams = orvalSchemas.LoopsPreviewCreateParams()
+ return LoopsPreviewCreateParams.omit({ project_id: true }).extend(LoopsPreviewCreateBody.shape)
+}
-const loopsPreviewCreate = (): ToolBase<typeof LoopsPreviewCreateSchema, Schemas.LoopPreviewDTO> => ({
+const loopsPreviewCreate = (): ToolBase<ReturnType<typeof LoopsPreviewCreateSchema>, Schemas.LoopPreviewDTO> => ({
name: 'loops-preview-create',
- schema: LoopsPreviewCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LoopsPreviewCreateSchema>) => {
+ schema: LoopsPreviewCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LoopsPreviewCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.trigger_type !== undefined) {
@@ -439,12 +451,15 @@ const loopsPreviewCreate = (): ToolBase<typeof LoopsPreviewCreateSchema, Schemas
},
})
-const LoopsRetrieveSchema = LoopsRetrieveParams.omit({ project_id: true })
+const LoopsRetrieveSchema = () => {
+ const LoopsRetrieveParams = orvalSchemas.LoopsRetrieveParams()
+ return LoopsRetrieveParams.omit({ project_id: true })
+}
-const loopsRetrieve = (): ToolBase<typeof LoopsRetrieveSchema, WithPostHogUrl<Schemas.LoopDTO>> => ({
+const loopsRetrieve = (): ToolBase<ReturnType<typeof LoopsRetrieveSchema>, WithPostHogUrl<Schemas.LoopDTO>> => ({
name: 'loops-retrieve',
- schema: LoopsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof LoopsRetrieveSchema>) => {
+ schema: LoopsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LoopsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.LoopDTO>({
method: 'GET',
@@ -454,12 +469,15 @@ const loopsRetrieve = (): ToolBase<typeof LoopsRetrieveSchema, WithPostHogUrl<Sc
},
})
-const LoopsRunCreateSchema = LoopsRunCreateParams.omit({ project_id: true })
+const LoopsRunCreateSchema = () => {
+ const LoopsRunCreateParams = orvalSchemas.LoopsRunCreateParams()
+ return LoopsRunCreateParams.omit({ project_id: true })
+}
-const loopsRunCreate = (): ToolBase<typeof LoopsRunCreateSchema, Schemas.LoopFireResult> => ({
+const loopsRunCreate = (): ToolBase<ReturnType<typeof LoopsRunCreateSchema>, Schemas.LoopFireResult> => ({
name: 'loops-run-create',
- schema: LoopsRunCreateSchema,
- handler: async (context: Context, params: z.infer<typeof LoopsRunCreateSchema>) => {
+ schema: LoopsRunCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LoopsRunCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.LoopFireResult>({
method: 'POST',
@@ -469,14 +487,19 @@ const loopsRunCreate = (): ToolBase<typeof LoopsRunCreateSchema, Schemas.LoopFir
},
})
-const LoopsRunsRetrieveSchema = LoopsRunsRetrieveParams.omit({ project_id: true }).extend(
- LoopsRunsRetrieveQueryParams.shape
-)
+const LoopsRunsRetrieveSchema = () => {
+ const LoopsRunsRetrieveParams = orvalSchemas.LoopsRunsRetrieveParams()
+ const LoopsRunsRetrieveQueryParams = orvalSchemas.LoopsRunsRetrieveQueryParams()
+ return LoopsRunsRetrieveParams.omit({ project_id: true }).extend(LoopsRunsRetrieveQueryParams.shape)
+}
-const loopsRunsRetrieve = (): ToolBase<typeof LoopsRunsRetrieveSchema, WithPostHogUrl<Schemas.LoopRunPage>> => ({
+const loopsRunsRetrieve = (): ToolBase<
+ ReturnType<typeof LoopsRunsRetrieveSchema>,
+ WithPostHogUrl<Schemas.LoopRunPage>
+> => ({
name: 'loops-runs-retrieve',
- schema: LoopsRunsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof LoopsRunsRetrieveSchema>) => {
+ schema: LoopsRunsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof LoopsRunsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.LoopRunPage>({
method: 'GET',
@@ -499,42 +522,45 @@ const loopsRunsRetrieve = (): ToolBase<typeof LoopsRunsRetrieveSchema, WithPostH
},
})
-const TasksCreateSchema = TasksCreateBody.omit({
- title_manually_set: true,
- origin_product: true,
- repositories: true,
- github_integration: true,
- github_user_integration: true,
- signal_report: true,
- signal_report_task_relationship: true,
- json_schema: true,
- archived: true,
- ci_prompt: true,
- branch: true,
- runtime_adapter: true,
- model: true,
- reasoning_effort: true,
- initial_permission_mode: true,
- pending_user_message: true,
- pending_user_artifact_ids: true,
- auto_publish: true,
- channel: true,
- naming_source: true,
- sandbox_environment_id: true,
- custom_image_id: true,
- runtime: true,
-}).extend({
- description: TasksCreateBody.shape['description']
- .unwrap()
- .describe(
- 'The task for the agent to carry out, written as a direct prompt (e.g. "Investigate the spike in $exception events on the checkout page and open a PR with a fix"). Passed verbatim to the agent as its instructions, so be specific.'
- ),
-})
+const TasksCreateSchema = () => {
+ const TasksCreateBody = orvalSchemas.TasksCreateBody()
+ return TasksCreateBody.omit({
+ title_manually_set: true,
+ origin_product: true,
+ repositories: true,
+ github_integration: true,
+ github_user_integration: true,
+ signal_report: true,
+ signal_report_task_relationship: true,
+ json_schema: true,
+ archived: true,
+ ci_prompt: true,
+ branch: true,
+ runtime_adapter: true,
+ model: true,
+ reasoning_effort: true,
+ initial_permission_mode: true,
+ pending_user_message: true,
+ pending_user_artifact_ids: true,
+ auto_publish: true,
+ channel: true,
+ naming_source: true,
+ sandbox_environment_id: true,
+ custom_image_id: true,
+ runtime: true,
+ }).extend({
+ description: TasksCreateBody.shape['description']
+ .unwrap()
+ .describe(
+ 'The task for the agent to carry out, written as a direct prompt (e.g. "Investigate the spike in $exception events on the checkout page and open a PR with a fix"). Passed verbatim to the agent as its instructions, so be specific.'
+ ),
+ })
+}
-const tasksCreate = (): ToolBase<typeof TasksCreateSchema, WithPostHogUrl<Schemas.TaskDetailDTO>> => ({
+const tasksCreate = (): ToolBase<ReturnType<typeof TasksCreateSchema>, WithPostHogUrl<Schemas.TaskDetailDTO>> => ({
name: 'tasks-create',
- schema: TasksCreateSchema,
- handler: async (context: Context, params: z.infer<typeof TasksCreateSchema>) => {
+ schema: TasksCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof TasksCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.title !== undefined) {
@@ -566,12 +592,18 @@ const tasksCreate = (): ToolBase<typeof TasksCreateSchema, WithPostHogUrl<Schema
},
})
-const TasksListSchema = TasksListQueryParams
+const TasksListSchema = () => {
+ const TasksListQueryParams = orvalSchemas.TasksListQueryParams()
+ return TasksListQueryParams
+}
-const tasksList = (): ToolBase<typeof TasksListSchema, WithPostHogUrl<Schemas.PaginatedTaskDetailDTOList>> => ({
+const tasksList = (): ToolBase<
+ ReturnType<typeof TasksListSchema>,
+ WithPostHogUrl<Schemas.PaginatedTaskDetailDTOList>
+> => ({
name: 'tasks-list',
- schema: TasksListSchema,
- handler: async (context: Context, params: z.infer<typeof TasksListSchema>) => {
+ schema: TasksListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof TasksListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedTaskDetailDTOList>({
method: 'GET',
@@ -634,12 +666,15 @@ const tasksList = (): ToolBase<typeof TasksListSchema, WithPostHogUrl<Schemas.Pa
},
})
-const TasksRetrieveSchema = TasksRetrieveParams.omit({ project_id: true })
+const TasksRetrieveSchema = () => {
+ const TasksRetrieveParams = orvalSchemas.TasksRetrieveParams()
+ return TasksRetrieveParams.omit({ project_id: true })
+}
-const tasksRetrieve = (): ToolBase<typeof TasksRetrieveSchema, WithPostHogUrl<Schemas.TaskDetailDTO>> => ({
+const tasksRetrieve = (): ToolBase<ReturnType<typeof TasksRetrieveSchema>, WithPostHogUrl<Schemas.TaskDetailDTO>> => ({
name: 'tasks-retrieve',
- schema: TasksRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof TasksRetrieveSchema>) => {
+ schema: TasksRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof TasksRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.TaskDetailDTO>({
method: 'GET',
@@ -654,15 +689,19 @@ const tasksRetrieve = (): ToolBase<typeof TasksRetrieveSchema, WithPostHogUrl<Sc
},
})
-const TasksRunsListSchema = TasksRunsListParams.omit({ project_id: true }).extend(TasksRunsListQueryParams.shape)
+const TasksRunsListSchema = () => {
+ const TasksRunsListParams = orvalSchemas.TasksRunsListParams()
+ const TasksRunsListQueryParams = orvalSchemas.TasksRunsListQueryParams()
+ return TasksRunsListParams.omit({ project_id: true }).extend(TasksRunsListQueryParams.shape)
+}
const tasksRunsList = (): ToolBase<
- typeof TasksRunsListSchema,
+ ReturnType<typeof TasksRunsListSchema>,
WithPostHogUrl<Schemas.PaginatedTaskRunDetailDTOList>
> => ({
name: 'tasks-runs-list',
- schema: TasksRunsListSchema,
- handler: async (context: Context, params: z.infer<typeof TasksRunsListSchema>) => {
+ schema: TasksRunsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof TasksRunsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedTaskRunDetailDTOList>({
method: 'GET',
@@ -694,12 +733,15 @@ const tasksRunsList = (): ToolBase<
},
})
-const TasksRunsRetrieveSchema = TasksRunsRetrieveParams.omit({ project_id: true })
+const TasksRunsRetrieveSchema = () => {
+ const TasksRunsRetrieveParams = orvalSchemas.TasksRunsRetrieveParams()
+ return TasksRunsRetrieveParams.omit({ project_id: true })
+}
-const tasksRunsRetrieve = (): ToolBase<typeof TasksRunsRetrieveSchema, Schemas.TaskRunDetailDTO> => ({
+const tasksRunsRetrieve = (): ToolBase<ReturnType<typeof TasksRunsRetrieveSchema>, Schemas.TaskRunDetailDTO> => ({
name: 'tasks-runs-retrieve',
- schema: TasksRunsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof TasksRunsRetrieveSchema>) => {
+ schema: TasksRunsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof TasksRunsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.TaskRunDetailDTO>({
method: 'GET',
@@ -714,19 +756,23 @@ const tasksRunsRetrieve = (): ToolBase<typeof TasksRunsRetrieveSchema, Schemas.T
},
})
-const TasksRunsSessionLogsRetrieveSchema = TasksRunsSessionLogsRetrieveParams.omit({ project_id: true })
- .extend(TasksRunsSessionLogsRetrieveQueryParams.shape)
- .extend({
- limit: TasksRunsSessionLogsRetrieveQueryParams.shape['limit']
- .default(100)
- .optional()
- .describe('Maximum number of entries to return (default 100, max 5000)'),
- })
+const TasksRunsSessionLogsRetrieveSchema = () => {
+ const TasksRunsSessionLogsRetrieveParams = orvalSchemas.TasksRunsSessionLogsRetrieveParams()
+ const TasksRunsSessionLogsRetrieveQueryParams = orvalSchemas.TasksRunsSessionLogsRetrieveQueryParams()
+ return TasksRunsSessionLogsRetrieveParams.omit({ project_id: true })
+ .extend(TasksRunsSessionLogsRetrieveQueryParams.shape)
+ .extend({
+ limit: TasksRunsSessionLogsRetrieveQueryParams.shape['limit']
+ .default(100)
+ .optional()
+ .describe('Maximum number of entries to return (default 100, max 5000)'),
+ })
+}
-const tasksRunsSessionLogsRetrieve = (): ToolBase<typeof TasksRunsSessionLogsRetrieveSchema, unknown> => ({
+const tasksRunsSessionLogsRetrieve = (): ToolBase<ReturnType<typeof TasksRunsSessionLogsRetrieveSchema>, unknown> => ({
name: 'tasks-runs-session-logs-retrieve',
- schema: TasksRunsSessionLogsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof TasksRunsSessionLogsRetrieveSchema>) => {
+ schema: TasksRunsSessionLogsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof TasksRunsSessionLogsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/tracing.ts b/services/mcp/src/tools/generated/tracing.ts
index b6e9ad9b7de5..1f9701ea369a 100644
--- a/services/mcp/src/tools/generated/tracing.ts
+++ b/services/mcp/src/tools/generated/tracing.ts
@@ -2,34 +2,23 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- TracingSpansAggregateCreateBody,
- TracingSpansAttributeBreakdownCreateBody,
- TracingSpansAttributesRetrieveQueryParams,
- TracingSpansCountCreateBody,
- TracingSpansDurationHistogramCreateBody,
- TracingSpansLatencyHeatmapCreateBody,
- TracingSpansQueryCreateBody,
- TracingSpansServiceNamesRetrieveQueryParams,
- TracingSpansSparklineCreateBody,
- TracingSpansTraceCreateBody,
- TracingSpansTraceCreateParams,
- TracingSpansTreeCreateBody,
- TracingSpansValuesRetrieveQueryParams,
-} from '@/generated/tracing/api'
+import * as orvalSchemas from '@/generated/tracing/api'
import { withUiApp } from '@/resources/ui-apps'
import { withPostHogUrl, pickResponseFields } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const ApmAttributeBreakdownSchema = TracingSpansAttributeBreakdownCreateBody
+const ApmAttributeBreakdownSchema = () => {
+ const TracingSpansAttributeBreakdownCreateBody = orvalSchemas.TracingSpansAttributeBreakdownCreateBody()
+ return TracingSpansAttributeBreakdownCreateBody
+}
const apmAttributeBreakdown = (): ToolBase<
- typeof ApmAttributeBreakdownSchema,
+ ReturnType<typeof ApmAttributeBreakdownSchema>,
Schemas._TracingAttributeBreakdownResponse
> => ({
name: 'apm-attribute-breakdown',
- schema: ApmAttributeBreakdownSchema,
- handler: async (context: Context, params: z.infer<typeof ApmAttributeBreakdownSchema>) => {
+ schema: ApmAttributeBreakdownSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ApmAttributeBreakdownSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
@@ -45,12 +34,15 @@ const apmAttributeBreakdown = (): ToolBase<
},
})
-const ApmAttributeValuesListSchema = TracingSpansValuesRetrieveQueryParams
+const ApmAttributeValuesListSchema = () => {
+ const TracingSpansValuesRetrieveQueryParams = orvalSchemas.TracingSpansValuesRetrieveQueryParams()
+ return TracingSpansValuesRetrieveQueryParams
+}
-const apmAttributeValuesList = (): ToolBase<typeof ApmAttributeValuesListSchema, unknown> => ({
+const apmAttributeValuesList = (): ToolBase<ReturnType<typeof ApmAttributeValuesListSchema>, unknown> => ({
name: 'apm-attribute-values-list',
- schema: ApmAttributeValuesListSchema,
- handler: async (context: Context, params: z.infer<typeof ApmAttributeValuesListSchema>) => {
+ schema: ApmAttributeValuesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ApmAttributeValuesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'GET',
@@ -68,12 +60,18 @@ const apmAttributeValuesList = (): ToolBase<typeof ApmAttributeValuesListSchema,
},
})
-const ApmAttributesListSchema = TracingSpansAttributesRetrieveQueryParams
+const ApmAttributesListSchema = () => {
+ const TracingSpansAttributesRetrieveQueryParams = orvalSchemas.TracingSpansAttributesRetrieveQueryParams()
+ return TracingSpansAttributesRetrieveQueryParams
+}
-const apmAttributesList = (): ToolBase<typeof ApmAttributesListSchema, Schemas._TracingAttributesResponse> => ({
+const apmAttributesList = (): ToolBase<
+ ReturnType<typeof ApmAttributesListSchema>,
+ Schemas._TracingAttributesResponse
+> => ({
name: 'apm-attributes-list',
- schema: ApmAttributesListSchema,
- handler: async (context: Context, params: z.infer<typeof ApmAttributesListSchema>) => {
+ schema: ApmAttributesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ApmAttributesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas._TracingAttributesResponse>({
method: 'GET',
@@ -91,12 +89,15 @@ const apmAttributesList = (): ToolBase<typeof ApmAttributesListSchema, Schemas._
},
})
-const ApmServicesListSchema = TracingSpansServiceNamesRetrieveQueryParams
+const ApmServicesListSchema = () => {
+ const TracingSpansServiceNamesRetrieveQueryParams = orvalSchemas.TracingSpansServiceNamesRetrieveQueryParams()
+ return TracingSpansServiceNamesRetrieveQueryParams
+}
-const apmServicesList = (): ToolBase<typeof ApmServicesListSchema, unknown> => ({
+const apmServicesList = (): ToolBase<ReturnType<typeof ApmServicesListSchema>, unknown> => ({
name: 'apm-services-list',
- schema: ApmServicesListSchema,
- handler: async (context: Context, params: z.infer<typeof ApmServicesListSchema>) => {
+ schema: ApmServicesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ApmServicesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'GET',
@@ -111,12 +112,18 @@ const apmServicesList = (): ToolBase<typeof ApmServicesListSchema, unknown> => (
},
})
-const ApmSpansAggregateSchema = TracingSpansAggregateCreateBody
+const ApmSpansAggregateSchema = () => {
+ const TracingSpansAggregateCreateBody = orvalSchemas.TracingSpansAggregateCreateBody()
+ return TracingSpansAggregateCreateBody
+}
-const apmSpansAggregate = (): ToolBase<typeof ApmSpansAggregateSchema, Schemas._TracingAggregationResponse> => ({
+const apmSpansAggregate = (): ToolBase<
+ ReturnType<typeof ApmSpansAggregateSchema>,
+ Schemas._TracingAggregationResponse
+> => ({
name: 'apm-spans-aggregate',
- schema: ApmSpansAggregateSchema,
- handler: async (context: Context, params: z.infer<typeof ApmSpansAggregateSchema>) => {
+ schema: ApmSpansAggregateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ApmSpansAggregateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
@@ -132,12 +139,15 @@ const apmSpansAggregate = (): ToolBase<typeof ApmSpansAggregateSchema, Schemas._
},
})
-const ApmSpansCountSchema = TracingSpansCountCreateBody
+const ApmSpansCountSchema = () => {
+ const TracingSpansCountCreateBody = orvalSchemas.TracingSpansCountCreateBody()
+ return TracingSpansCountCreateBody
+}
-const apmSpansCount = (): ToolBase<typeof ApmSpansCountSchema, Schemas._TracingCountResponse> => ({
+const apmSpansCount = (): ToolBase<ReturnType<typeof ApmSpansCountSchema>, Schemas._TracingCountResponse> => ({
name: 'apm-spans-count',
- schema: ApmSpansCountSchema,
- handler: async (context: Context, params: z.infer<typeof ApmSpansCountSchema>) => {
+ schema: ApmSpansCountSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ApmSpansCountSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
@@ -153,12 +163,15 @@ const apmSpansCount = (): ToolBase<typeof ApmSpansCountSchema, Schemas._TracingC
},
})
-const ApmSpansDurationHistogramSchema = TracingSpansDurationHistogramCreateBody
+const ApmSpansDurationHistogramSchema = () => {
+ const TracingSpansDurationHistogramCreateBody = orvalSchemas.TracingSpansDurationHistogramCreateBody()
+ return TracingSpansDurationHistogramCreateBody
+}
-const apmSpansDurationHistogram = (): ToolBase<typeof ApmSpansDurationHistogramSchema, unknown> => ({
+const apmSpansDurationHistogram = (): ToolBase<ReturnType<typeof ApmSpansDurationHistogramSchema>, unknown> => ({
name: 'apm-spans-duration-histogram',
- schema: ApmSpansDurationHistogramSchema,
- handler: async (context: Context, params: z.infer<typeof ApmSpansDurationHistogramSchema>) => {
+ schema: ApmSpansDurationHistogramSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ApmSpansDurationHistogramSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
@@ -174,15 +187,18 @@ const apmSpansDurationHistogram = (): ToolBase<typeof ApmSpansDurationHistogramS
},
})
-const ApmSpansLatencyHeatmapSchema = TracingSpansLatencyHeatmapCreateBody
+const ApmSpansLatencyHeatmapSchema = () => {
+ const TracingSpansLatencyHeatmapCreateBody = orvalSchemas.TracingSpansLatencyHeatmapCreateBody()
+ return TracingSpansLatencyHeatmapCreateBody
+}
const apmSpansLatencyHeatmap = (): ToolBase<
- typeof ApmSpansLatencyHeatmapSchema,
+ ReturnType<typeof ApmSpansLatencyHeatmapSchema>,
Schemas._TracingLatencyHeatmapResponse
> => ({
name: 'apm-spans-latency-heatmap',
- schema: ApmSpansLatencyHeatmapSchema,
- handler: async (context: Context, params: z.infer<typeof ApmSpansLatencyHeatmapSchema>) => {
+ schema: ApmSpansLatencyHeatmapSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ApmSpansLatencyHeatmapSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
@@ -198,12 +214,15 @@ const apmSpansLatencyHeatmap = (): ToolBase<
},
})
-const ApmSpansSparklineSchema = TracingSpansSparklineCreateBody
+const ApmSpansSparklineSchema = () => {
+ const TracingSpansSparklineCreateBody = orvalSchemas.TracingSpansSparklineCreateBody()
+ return TracingSpansSparklineCreateBody
+}
-const apmSpansSparkline = (): ToolBase<typeof ApmSpansSparklineSchema, unknown> => ({
+const apmSpansSparkline = (): ToolBase<ReturnType<typeof ApmSpansSparklineSchema>, unknown> => ({
name: 'apm-spans-sparkline',
- schema: ApmSpansSparklineSchema,
- handler: async (context: Context, params: z.infer<typeof ApmSpansSparklineSchema>) => {
+ schema: ApmSpansSparklineSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ApmSpansSparklineSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
@@ -219,12 +238,15 @@ const apmSpansSparkline = (): ToolBase<typeof ApmSpansSparklineSchema, unknown>
},
})
-const ApmSpansTreeSchema = TracingSpansTreeCreateBody
+const ApmSpansTreeSchema = () => {
+ const TracingSpansTreeCreateBody = orvalSchemas.TracingSpansTreeCreateBody()
+ return TracingSpansTreeCreateBody
+}
-const apmSpansTree = (): ToolBase<typeof ApmSpansTreeSchema, unknown> => ({
+const apmSpansTree = (): ToolBase<ReturnType<typeof ApmSpansTreeSchema>, unknown> => ({
name: 'apm-spans-tree',
- schema: ApmSpansTreeSchema,
- handler: async (context: Context, params: z.infer<typeof ApmSpansTreeSchema>) => {
+ schema: ApmSpansTreeSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ApmSpansTreeSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
@@ -240,15 +262,17 @@ const apmSpansTree = (): ToolBase<typeof ApmSpansTreeSchema, unknown> => ({
},
})
-const ApmTraceGetSchema = TracingSpansTraceCreateParams.omit({ project_id: true }).extend(
- TracingSpansTraceCreateBody.shape
-)
+const ApmTraceGetSchema = () => {
+ const TracingSpansTraceCreateBody = orvalSchemas.TracingSpansTraceCreateBody()
+ const TracingSpansTraceCreateParams = orvalSchemas.TracingSpansTraceCreateParams()
+ return TracingSpansTraceCreateParams.omit({ project_id: true }).extend(TracingSpansTraceCreateBody.shape)
+}
-const apmTraceGet = (): ToolBase<typeof ApmTraceGetSchema, unknown> =>
+const apmTraceGet = (): ToolBase<ReturnType<typeof ApmTraceGetSchema>, unknown> =>
withUiApp('trace-span-list', {
name: 'apm-trace-get',
- schema: ApmTraceGetSchema,
- handler: async (context: Context, params: z.infer<typeof ApmTraceGetSchema>) => {
+ schema: ApmTraceGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ApmTraceGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.dateRange !== undefined) {
@@ -270,13 +294,16 @@ const apmTraceGet = (): ToolBase<typeof ApmTraceGetSchema, unknown> =>
},
})
-const QueryApmSpansSchema = TracingSpansQueryCreateBody
+const QueryApmSpansSchema = () => {
+ const TracingSpansQueryCreateBody = orvalSchemas.TracingSpansQueryCreateBody()
+ return TracingSpansQueryCreateBody
+}
-const queryApmSpans = (): ToolBase<typeof QueryApmSpansSchema, unknown> =>
+const queryApmSpans = (): ToolBase<ReturnType<typeof QueryApmSpansSchema>, unknown> =>
withUiApp('trace-span-list', {
name: 'query-apm-spans',
- schema: QueryApmSpansSchema,
- handler: async (context: Context, params: z.infer<typeof QueryApmSpansSchema>) => {
+ schema: QueryApmSpansSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof QueryApmSpansSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
diff --git a/services/mcp/src/tools/generated/user_interviews.ts b/services/mcp/src/tools/generated/user_interviews.ts
index d73fb545ed35..5b711c784699 100644
--- a/services/mcp/src/tools/generated/user_interviews.ts
+++ b/services/mcp/src/tools/generated/user_interviews.ts
@@ -2,52 +2,26 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- UserInterviewTopicsAddIntervieweeCreateBody,
- UserInterviewTopicsAddIntervieweeCreateParams,
- UserInterviewTopicsCreateBody,
- UserInterviewTopicsGenerateLinksCreateParams,
- UserInterviewTopicsIntervieweesBulkCreateBody,
- UserInterviewTopicsIntervieweesBulkCreateParams,
- UserInterviewTopicsIntervieweesCreateBody,
- UserInterviewTopicsIntervieweesCreateParams,
- UserInterviewTopicsIntervieweesDestroyParams,
- UserInterviewTopicsIntervieweesListParams,
- UserInterviewTopicsIntervieweesListQueryParams,
- UserInterviewTopicsIntervieweesPartialUpdateBody,
- UserInterviewTopicsIntervieweesPartialUpdateParams,
- UserInterviewTopicsLinksCsvCreateParams,
- UserInterviewTopicsListQueryParams,
- UserInterviewTopicsPartialUpdateBody,
- UserInterviewTopicsPartialUpdateParams,
- UserInterviewTopicsPreviewInviteCreateBody,
- UserInterviewTopicsPreviewInviteCreateParams,
- UserInterviewTopicsRemoveIntervieweeCreateBody,
- UserInterviewTopicsRemoveIntervieweeCreateParams,
- UserInterviewTopicsRetrieveParams,
- UserInterviewTopicsSendInvitesCreateBody,
- UserInterviewTopicsSendInvitesCreateParams,
- UserInterviewsListQueryParams,
- UserInterviewsPartialUpdateBody,
- UserInterviewsPartialUpdateParams,
- UserInterviewsRetrieveParams,
- UserInterviewsSearchCreateBody,
-} from '@/generated/user_interviews/api'
+import * as orvalSchemas from '@/generated/user_interviews/api'
import { withUiApp } from '@/resources/ui-apps'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const UserInterviewTopicsAddIntervieweeSchema = UserInterviewTopicsAddIntervieweeCreateParams.omit({
- project_id: true,
-}).extend(UserInterviewTopicsAddIntervieweeCreateBody.shape)
+const UserInterviewTopicsAddIntervieweeSchema = () => {
+ const UserInterviewTopicsAddIntervieweeCreateBody = orvalSchemas.UserInterviewTopicsAddIntervieweeCreateBody()
+ const UserInterviewTopicsAddIntervieweeCreateParams = orvalSchemas.UserInterviewTopicsAddIntervieweeCreateParams()
+ return UserInterviewTopicsAddIntervieweeCreateParams.omit({ project_id: true }).extend(
+ UserInterviewTopicsAddIntervieweeCreateBody.shape
+ )
+}
const userInterviewTopicsAddInterviewee = (): ToolBase<
- typeof UserInterviewTopicsAddIntervieweeSchema,
+ ReturnType<typeof UserInterviewTopicsAddIntervieweeSchema>,
Schemas.UserInterviewTopic
> => ({
name: 'user-interview-topics-add-interviewee',
- schema: UserInterviewTopicsAddIntervieweeSchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewTopicsAddIntervieweeSchema>) => {
+ schema: UserInterviewTopicsAddIntervieweeSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UserInterviewTopicsAddIntervieweeSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.identifier !== undefined) {
@@ -62,12 +36,18 @@ const userInterviewTopicsAddInterviewee = (): ToolBase<
},
})
-const UserInterviewTopicsCreateSchema = UserInterviewTopicsCreateBody
+const UserInterviewTopicsCreateSchema = () => {
+ const UserInterviewTopicsCreateBody = orvalSchemas.UserInterviewTopicsCreateBody()
+ return UserInterviewTopicsCreateBody
+}
-const userInterviewTopicsCreate = (): ToolBase<typeof UserInterviewTopicsCreateSchema, Schemas.UserInterviewTopic> => ({
+const userInterviewTopicsCreate = (): ToolBase<
+ ReturnType<typeof UserInterviewTopicsCreateSchema>,
+ Schemas.UserInterviewTopic
+> => ({
name: 'user-interview-topics-create',
- schema: UserInterviewTopicsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewTopicsCreateSchema>) => {
+ schema: UserInterviewTopicsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UserInterviewTopicsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.interviewee_emails !== undefined) {
@@ -100,15 +80,18 @@ const userInterviewTopicsCreate = (): ToolBase<typeof UserInterviewTopicsCreateS
},
})
-const UserInterviewTopicsGenerateLinksSchema = UserInterviewTopicsGenerateLinksCreateParams.omit({ project_id: true })
+const UserInterviewTopicsGenerateLinksSchema = () => {
+ const UserInterviewTopicsGenerateLinksCreateParams = orvalSchemas.UserInterviewTopicsGenerateLinksCreateParams()
+ return UserInterviewTopicsGenerateLinksCreateParams.omit({ project_id: true })
+}
const userInterviewTopicsGenerateLinks = (): ToolBase<
- typeof UserInterviewTopicsGenerateLinksSchema,
+ ReturnType<typeof UserInterviewTopicsGenerateLinksSchema>,
Schemas.PaginatedInterviewLinkList
> => ({
name: 'user-interview-topics-generate-links',
- schema: UserInterviewTopicsGenerateLinksSchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewTopicsGenerateLinksSchema>) => {
+ schema: UserInterviewTopicsGenerateLinksSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UserInterviewTopicsGenerateLinksSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedInterviewLinkList>({
method: 'POST',
@@ -118,17 +101,25 @@ const userInterviewTopicsGenerateLinks = (): ToolBase<
},
})
-const UserInterviewTopicsIntervieweesBulkCreateSchema = UserInterviewTopicsIntervieweesBulkCreateParams.omit({
- project_id: true,
-}).extend(UserInterviewTopicsIntervieweesBulkCreateBody.shape)
+const UserInterviewTopicsIntervieweesBulkCreateSchema = () => {
+ const UserInterviewTopicsIntervieweesBulkCreateBody = orvalSchemas.UserInterviewTopicsIntervieweesBulkCreateBody()
+ const UserInterviewTopicsIntervieweesBulkCreateParams =
+ orvalSchemas.UserInterviewTopicsIntervieweesBulkCreateParams()
+ return UserInterviewTopicsIntervieweesBulkCreateParams.omit({ project_id: true }).extend(
+ UserInterviewTopicsIntervieweesBulkCreateBody.shape
+ )
+}
const userInterviewTopicsIntervieweesBulkCreate = (): ToolBase<
- typeof UserInterviewTopicsIntervieweesBulkCreateSchema,
+ ReturnType<typeof UserInterviewTopicsIntervieweesBulkCreateSchema>,
Schemas.BulkIntervieweeContextResponse
> => ({
name: 'user-interview-topics-interviewees-bulk-create',
- schema: UserInterviewTopicsIntervieweesBulkCreateSchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewTopicsIntervieweesBulkCreateSchema>) => {
+ schema: UserInterviewTopicsIntervieweesBulkCreateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof UserInterviewTopicsIntervieweesBulkCreateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.items !== undefined) {
@@ -143,17 +134,24 @@ const userInterviewTopicsIntervieweesBulkCreate = (): ToolBase<
},
})
-const UserInterviewTopicsIntervieweesCreateSchema = UserInterviewTopicsIntervieweesCreateParams.omit({
- project_id: true,
-}).extend(UserInterviewTopicsIntervieweesCreateBody.shape)
+const UserInterviewTopicsIntervieweesCreateSchema = () => {
+ const UserInterviewTopicsIntervieweesCreateBody = orvalSchemas.UserInterviewTopicsIntervieweesCreateBody()
+ const UserInterviewTopicsIntervieweesCreateParams = orvalSchemas.UserInterviewTopicsIntervieweesCreateParams()
+ return UserInterviewTopicsIntervieweesCreateParams.omit({ project_id: true }).extend(
+ UserInterviewTopicsIntervieweesCreateBody.shape
+ )
+}
const userInterviewTopicsIntervieweesCreate = (): ToolBase<
- typeof UserInterviewTopicsIntervieweesCreateSchema,
+ ReturnType<typeof UserInterviewTopicsIntervieweesCreateSchema>,
Schemas.IntervieweeContext
> => ({
name: 'user-interview-topics-interviewees-create',
- schema: UserInterviewTopicsIntervieweesCreateSchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewTopicsIntervieweesCreateSchema>) => {
+ schema: UserInterviewTopicsIntervieweesCreateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof UserInterviewTopicsIntervieweesCreateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.interviewee_identifier !== undefined) {
@@ -171,17 +169,21 @@ const userInterviewTopicsIntervieweesCreate = (): ToolBase<
},
})
-const UserInterviewTopicsIntervieweesDestroySchema = UserInterviewTopicsIntervieweesDestroyParams.omit({
- project_id: true,
-})
+const UserInterviewTopicsIntervieweesDestroySchema = () => {
+ const UserInterviewTopicsIntervieweesDestroyParams = orvalSchemas.UserInterviewTopicsIntervieweesDestroyParams()
+ return UserInterviewTopicsIntervieweesDestroyParams.omit({ project_id: true })
+}
const userInterviewTopicsIntervieweesDestroy = (): ToolBase<
- typeof UserInterviewTopicsIntervieweesDestroySchema,
+ ReturnType<typeof UserInterviewTopicsIntervieweesDestroySchema>,
unknown
> => ({
name: 'user-interview-topics-interviewees-destroy',
- schema: UserInterviewTopicsIntervieweesDestroySchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewTopicsIntervieweesDestroySchema>) => {
+ schema: UserInterviewTopicsIntervieweesDestroySchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof UserInterviewTopicsIntervieweesDestroySchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -191,17 +193,24 @@ const userInterviewTopicsIntervieweesDestroy = (): ToolBase<
},
})
-const UserInterviewTopicsIntervieweesListSchema = UserInterviewTopicsIntervieweesListParams.omit({
- project_id: true,
-}).extend(UserInterviewTopicsIntervieweesListQueryParams.shape)
+const UserInterviewTopicsIntervieweesListSchema = () => {
+ const UserInterviewTopicsIntervieweesListParams = orvalSchemas.UserInterviewTopicsIntervieweesListParams()
+ const UserInterviewTopicsIntervieweesListQueryParams = orvalSchemas.UserInterviewTopicsIntervieweesListQueryParams()
+ return UserInterviewTopicsIntervieweesListParams.omit({ project_id: true }).extend(
+ UserInterviewTopicsIntervieweesListQueryParams.shape
+ )
+}
const userInterviewTopicsIntervieweesList = (): ToolBase<
- typeof UserInterviewTopicsIntervieweesListSchema,
+ ReturnType<typeof UserInterviewTopicsIntervieweesListSchema>,
WithPostHogUrl<Schemas.PaginatedIntervieweeContextList>
> => ({
name: 'user-interview-topics-interviewees-list',
- schema: UserInterviewTopicsIntervieweesListSchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewTopicsIntervieweesListSchema>) => {
+ schema: UserInterviewTopicsIntervieweesListSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof UserInterviewTopicsIntervieweesListSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedIntervieweeContextList>({
method: 'GET',
@@ -215,17 +224,26 @@ const userInterviewTopicsIntervieweesList = (): ToolBase<
},
})
-const UserInterviewTopicsIntervieweesPartialUpdateSchema = UserInterviewTopicsIntervieweesPartialUpdateParams.omit({
- project_id: true,
-}).extend(UserInterviewTopicsIntervieweesPartialUpdateBody.omit({ interviewee_identifier: true }).shape)
+const UserInterviewTopicsIntervieweesPartialUpdateSchema = () => {
+ const UserInterviewTopicsIntervieweesPartialUpdateBody =
+ orvalSchemas.UserInterviewTopicsIntervieweesPartialUpdateBody()
+ const UserInterviewTopicsIntervieweesPartialUpdateParams =
+ orvalSchemas.UserInterviewTopicsIntervieweesPartialUpdateParams()
+ return UserInterviewTopicsIntervieweesPartialUpdateParams.omit({ project_id: true }).extend(
+ UserInterviewTopicsIntervieweesPartialUpdateBody.omit({ interviewee_identifier: true }).shape
+ )
+}
const userInterviewTopicsIntervieweesPartialUpdate = (): ToolBase<
- typeof UserInterviewTopicsIntervieweesPartialUpdateSchema,
+ ReturnType<typeof UserInterviewTopicsIntervieweesPartialUpdateSchema>,
Schemas.IntervieweeContext
> => ({
name: 'user-interview-topics-interviewees-partial-update',
- schema: UserInterviewTopicsIntervieweesPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewTopicsIntervieweesPartialUpdateSchema>) => {
+ schema: UserInterviewTopicsIntervieweesPartialUpdateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof UserInterviewTopicsIntervieweesPartialUpdateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.agent_context !== undefined) {
@@ -240,12 +258,15 @@ const userInterviewTopicsIntervieweesPartialUpdate = (): ToolBase<
},
})
-const UserInterviewTopicsLinksCsvSchema = UserInterviewTopicsLinksCsvCreateParams.omit({ project_id: true })
+const UserInterviewTopicsLinksCsvSchema = () => {
+ const UserInterviewTopicsLinksCsvCreateParams = orvalSchemas.UserInterviewTopicsLinksCsvCreateParams()
+ return UserInterviewTopicsLinksCsvCreateParams.omit({ project_id: true })
+}
-const userInterviewTopicsLinksCsv = (): ToolBase<typeof UserInterviewTopicsLinksCsvSchema, unknown> => ({
+const userInterviewTopicsLinksCsv = (): ToolBase<ReturnType<typeof UserInterviewTopicsLinksCsvSchema>, unknown> => ({
name: 'user-interview-topics-links-csv',
- schema: UserInterviewTopicsLinksCsvSchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewTopicsLinksCsvSchema>) => {
+ schema: UserInterviewTopicsLinksCsvSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UserInterviewTopicsLinksCsvSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'POST',
@@ -255,15 +276,18 @@ const userInterviewTopicsLinksCsv = (): ToolBase<typeof UserInterviewTopicsLinks
},
})
-const UserInterviewTopicsListSchema = UserInterviewTopicsListQueryParams
+const UserInterviewTopicsListSchema = () => {
+ const UserInterviewTopicsListQueryParams = orvalSchemas.UserInterviewTopicsListQueryParams()
+ return UserInterviewTopicsListQueryParams
+}
const userInterviewTopicsList = (): ToolBase<
- typeof UserInterviewTopicsListSchema,
+ ReturnType<typeof UserInterviewTopicsListSchema>,
WithPostHogUrl<Schemas.PaginatedUserInterviewTopicList>
> => ({
name: 'user-interview-topics-list',
- schema: UserInterviewTopicsListSchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewTopicsListSchema>) => {
+ schema: UserInterviewTopicsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UserInterviewTopicsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedUserInterviewTopicList>({
method: 'GET',
@@ -278,17 +302,21 @@ const userInterviewTopicsList = (): ToolBase<
},
})
-const UserInterviewTopicsPartialUpdateSchema = UserInterviewTopicsPartialUpdateParams.omit({ project_id: true }).extend(
- UserInterviewTopicsPartialUpdateBody.shape
-)
+const UserInterviewTopicsPartialUpdateSchema = () => {
+ const UserInterviewTopicsPartialUpdateBody = orvalSchemas.UserInterviewTopicsPartialUpdateBody()
+ const UserInterviewTopicsPartialUpdateParams = orvalSchemas.UserInterviewTopicsPartialUpdateParams()
+ return UserInterviewTopicsPartialUpdateParams.omit({ project_id: true }).extend(
+ UserInterviewTopicsPartialUpdateBody.shape
+ )
+}
const userInterviewTopicsPartialUpdate = (): ToolBase<
- typeof UserInterviewTopicsPartialUpdateSchema,
+ ReturnType<typeof UserInterviewTopicsPartialUpdateSchema>,
Schemas.UserInterviewTopic
> => ({
name: 'user-interview-topics-partial-update',
- schema: UserInterviewTopicsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewTopicsPartialUpdateSchema>) => {
+ schema: UserInterviewTopicsPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UserInterviewTopicsPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.interviewee_emails !== undefined) {
@@ -321,18 +349,25 @@ const userInterviewTopicsPartialUpdate = (): ToolBase<
},
})
-const UserInterviewTopicsPreviewInviteSchema = UserInterviewTopicsPreviewInviteCreateParams.omit({
- project_id: true,
-}).extend(UserInterviewTopicsPreviewInviteCreateBody.shape)
+const UserInterviewTopicsPreviewInviteSchema = () => {
+ const UserInterviewTopicsPreviewInviteCreateBody = orvalSchemas.UserInterviewTopicsPreviewInviteCreateBody()
+ const UserInterviewTopicsPreviewInviteCreateParams = orvalSchemas.UserInterviewTopicsPreviewInviteCreateParams()
+ return UserInterviewTopicsPreviewInviteCreateParams.omit({ project_id: true }).extend(
+ UserInterviewTopicsPreviewInviteCreateBody.shape
+ )
+}
const userInterviewTopicsPreviewInvite = (): ToolBase<
- typeof UserInterviewTopicsPreviewInviteSchema,
+ ReturnType<typeof UserInterviewTopicsPreviewInviteSchema>,
Schemas.PreviewInviteResult
> =>
withUiApp('invite-email-preview', {
name: 'user-interview-topics-preview-invite',
- schema: UserInterviewTopicsPreviewInviteSchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewTopicsPreviewInviteSchema>) => {
+ schema: UserInterviewTopicsPreviewInviteSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof UserInterviewTopicsPreviewInviteSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.interviewee_identifier !== undefined) {
@@ -347,17 +382,25 @@ const userInterviewTopicsPreviewInvite = (): ToolBase<
},
})
-const UserInterviewTopicsRemoveIntervieweeSchema = UserInterviewTopicsRemoveIntervieweeCreateParams.omit({
- project_id: true,
-}).extend(UserInterviewTopicsRemoveIntervieweeCreateBody.shape)
+const UserInterviewTopicsRemoveIntervieweeSchema = () => {
+ const UserInterviewTopicsRemoveIntervieweeCreateBody = orvalSchemas.UserInterviewTopicsRemoveIntervieweeCreateBody()
+ const UserInterviewTopicsRemoveIntervieweeCreateParams =
+ orvalSchemas.UserInterviewTopicsRemoveIntervieweeCreateParams()
+ return UserInterviewTopicsRemoveIntervieweeCreateParams.omit({ project_id: true }).extend(
+ UserInterviewTopicsRemoveIntervieweeCreateBody.shape
+ )
+}
const userInterviewTopicsRemoveInterviewee = (): ToolBase<
- typeof UserInterviewTopicsRemoveIntervieweeSchema,
+ ReturnType<typeof UserInterviewTopicsRemoveIntervieweeSchema>,
Schemas.UserInterviewTopic
> => ({
name: 'user-interview-topics-remove-interviewee',
- schema: UserInterviewTopicsRemoveIntervieweeSchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewTopicsRemoveIntervieweeSchema>) => {
+ schema: UserInterviewTopicsRemoveIntervieweeSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof UserInterviewTopicsRemoveIntervieweeSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.identifier !== undefined) {
@@ -372,15 +415,18 @@ const userInterviewTopicsRemoveInterviewee = (): ToolBase<
},
})
-const UserInterviewTopicsRetrieveSchema = UserInterviewTopicsRetrieveParams.omit({ project_id: true })
+const UserInterviewTopicsRetrieveSchema = () => {
+ const UserInterviewTopicsRetrieveParams = orvalSchemas.UserInterviewTopicsRetrieveParams()
+ return UserInterviewTopicsRetrieveParams.omit({ project_id: true })
+}
const userInterviewTopicsRetrieve = (): ToolBase<
- typeof UserInterviewTopicsRetrieveSchema,
+ ReturnType<typeof UserInterviewTopicsRetrieveSchema>,
Schemas.UserInterviewTopic
> => ({
name: 'user-interview-topics-retrieve',
- schema: UserInterviewTopicsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewTopicsRetrieveSchema>) => {
+ schema: UserInterviewTopicsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UserInterviewTopicsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.UserInterviewTopic>({
method: 'GET',
@@ -390,17 +436,21 @@ const userInterviewTopicsRetrieve = (): ToolBase<
},
})
-const UserInterviewTopicsSendInvitesSchema = UserInterviewTopicsSendInvitesCreateParams.omit({
- project_id: true,
-}).extend(UserInterviewTopicsSendInvitesCreateBody.shape)
+const UserInterviewTopicsSendInvitesSchema = () => {
+ const UserInterviewTopicsSendInvitesCreateBody = orvalSchemas.UserInterviewTopicsSendInvitesCreateBody()
+ const UserInterviewTopicsSendInvitesCreateParams = orvalSchemas.UserInterviewTopicsSendInvitesCreateParams()
+ return UserInterviewTopicsSendInvitesCreateParams.omit({ project_id: true }).extend(
+ UserInterviewTopicsSendInvitesCreateBody.shape
+ )
+}
const userInterviewTopicsSendInvites = (): ToolBase<
- typeof UserInterviewTopicsSendInvitesSchema,
+ ReturnType<typeof UserInterviewTopicsSendInvitesSchema>,
Schemas.PaginatedInterviewInviteResultList
> => ({
name: 'user-interview-topics-send-invites',
- schema: UserInterviewTopicsSendInvitesSchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewTopicsSendInvitesSchema>) => {
+ schema: UserInterviewTopicsSendInvitesSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UserInterviewTopicsSendInvitesSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.subject !== undefined) {
@@ -421,15 +471,18 @@ const userInterviewTopicsSendInvites = (): ToolBase<
},
})
-const UserInterviewsListSchema = UserInterviewsListQueryParams
+const UserInterviewsListSchema = () => {
+ const UserInterviewsListQueryParams = orvalSchemas.UserInterviewsListQueryParams()
+ return UserInterviewsListQueryParams
+}
const userInterviewsList = (): ToolBase<
- typeof UserInterviewsListSchema,
+ ReturnType<typeof UserInterviewsListSchema>,
WithPostHogUrl<Schemas.PaginatedUserInterviewList>
> => ({
name: 'user-interviews-list',
- schema: UserInterviewsListSchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewsListSchema>) => {
+ schema: UserInterviewsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UserInterviewsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedUserInterviewList>({
method: 'GET',
@@ -445,14 +498,21 @@ const userInterviewsList = (): ToolBase<
},
})
-const UserInterviewsPartialUpdateSchema = UserInterviewsPartialUpdateParams.omit({ project_id: true }).extend(
- UserInterviewsPartialUpdateBody.omit({ interviewee_emails: true, summary: true, audio: true }).shape
-)
+const UserInterviewsPartialUpdateSchema = () => {
+ const UserInterviewsPartialUpdateBody = orvalSchemas.UserInterviewsPartialUpdateBody()
+ const UserInterviewsPartialUpdateParams = orvalSchemas.UserInterviewsPartialUpdateParams()
+ return UserInterviewsPartialUpdateParams.omit({ project_id: true }).extend(
+ UserInterviewsPartialUpdateBody.omit({ interviewee_emails: true, summary: true, audio: true }).shape
+ )
+}
-const userInterviewsPartialUpdate = (): ToolBase<typeof UserInterviewsPartialUpdateSchema, Schemas.UserInterview> => ({
+const userInterviewsPartialUpdate = (): ToolBase<
+ ReturnType<typeof UserInterviewsPartialUpdateSchema>,
+ Schemas.UserInterview
+> => ({
name: 'user-interviews-partial-update',
- schema: UserInterviewsPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewsPartialUpdateSchema>) => {
+ schema: UserInterviewsPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UserInterviewsPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.classifications !== undefined) {
@@ -467,12 +527,18 @@ const userInterviewsPartialUpdate = (): ToolBase<typeof UserInterviewsPartialUpd
},
})
-const UserInterviewsRetrieveSchema = UserInterviewsRetrieveParams.omit({ project_id: true })
+const UserInterviewsRetrieveSchema = () => {
+ const UserInterviewsRetrieveParams = orvalSchemas.UserInterviewsRetrieveParams()
+ return UserInterviewsRetrieveParams.omit({ project_id: true })
+}
-const userInterviewsRetrieve = (): ToolBase<typeof UserInterviewsRetrieveSchema, Schemas.UserInterview> => ({
+const userInterviewsRetrieve = (): ToolBase<
+ ReturnType<typeof UserInterviewsRetrieveSchema>,
+ Schemas.UserInterview
+> => ({
name: 'user-interviews-retrieve',
- schema: UserInterviewsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewsRetrieveSchema>) => {
+ schema: UserInterviewsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UserInterviewsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.UserInterview>({
method: 'GET',
@@ -482,12 +548,18 @@ const userInterviewsRetrieve = (): ToolBase<typeof UserInterviewsRetrieveSchema,
},
})
-const UserInterviewsSearchSchema = UserInterviewsSearchCreateBody
+const UserInterviewsSearchSchema = () => {
+ const UserInterviewsSearchCreateBody = orvalSchemas.UserInterviewsSearchCreateBody()
+ return UserInterviewsSearchCreateBody
+}
-const userInterviewsSearch = (): ToolBase<typeof UserInterviewsSearchSchema, Schemas.UserInterviewSearchResult[]> => ({
+const userInterviewsSearch = (): ToolBase<
+ ReturnType<typeof UserInterviewsSearchSchema>,
+ Schemas.UserInterviewSearchResult[]
+> => ({
name: 'user-interviews-search',
- schema: UserInterviewsSearchSchema,
- handler: async (context: Context, params: z.infer<typeof UserInterviewsSearchSchema>) => {
+ schema: UserInterviewsSearchSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof UserInterviewsSearchSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.query !== undefined) {
diff --git a/services/mcp/src/tools/generated/visual_review.ts b/services/mcp/src/tools/generated/visual_review.ts
index b0cc61e856ec..5fbfa86487e8 100644
--- a/services/mcp/src/tools/generated/visual_review.ts
+++ b/services/mcp/src/tools/generated/visual_review.ts
@@ -2,30 +2,7 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- VisualReviewReposFlakinessRetrieveParams,
- VisualReviewReposListQueryParams,
- VisualReviewReposQuarantineListParams,
- VisualReviewReposQuarantineListQueryParams,
- VisualReviewReposRetrieveParams,
- VisualReviewReposRunsCountsRetrieveParams,
- VisualReviewReposRunsListParams,
- VisualReviewReposRunsListQueryParams,
- VisualReviewRunsApproveCreateBody,
- VisualReviewRunsApproveCreateParams,
- VisualReviewRunsFinalizeCreateBody,
- VisualReviewRunsFinalizeCreateParams,
- VisualReviewRunsListQueryParams,
- VisualReviewRunsRetrieveParams,
- VisualReviewRunsSnapshotHistoryListParams,
- VisualReviewRunsSnapshotHistoryListQueryParams,
- VisualReviewRunsSnapshotsListParams,
- VisualReviewRunsSnapshotsListQueryParams,
- VisualReviewRunsTolerateCreateBody,
- VisualReviewRunsTolerateCreateParams,
- VisualReviewRunsToleratedHashesListParams,
- VisualReviewRunsToleratedHashesListQueryParams,
-} from '@/generated/visual_review/api'
+import * as orvalSchemas from '@/generated/visual_review/api'
import { withUiApp } from '@/resources/ui-apps'
import { normalizeParamAliases } from '@/tools/cast-helpers'
import {
@@ -37,56 +14,59 @@ import {
} from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const VisualReviewReposFlakinessRetrieveSchema = z.preprocess(
- normalizeParamAliases({ id: ['repo_id'] }),
- VisualReviewReposFlakinessRetrieveParams.omit({ project_id: true })
- .extend({
- id: VisualReviewReposFlakinessRetrieveParams.shape['id'].describe(
- "The repo's UUID, from `visual-review-repos-list`."
- ),
- })
- .extend({
- fields: z
- .array(
- z.enum([
- 'totals',
- 'truncated',
- 'generated_at',
- 'entries.*.identifier',
- 'entries.*.run_type',
- 'entries.*.flakiness_state',
- 'entries.*.hard_count',
- 'entries.*.soft_count',
- 'entries.*.window_runs',
- 'entries.*.hard_rate',
- 'entries.*.soft_rate',
- 'entries.*.headroom',
- 'entries.*.worst_soft_diff_percentage',
- 'entries.*.variant_count',
- 'entries.*.last_flaked_at',
- 'entries.*.baseline_age_days',
- 'entries.*.is_quarantined',
- 'entries.*.needs_decision',
- 'entries.*.quarantine.reason',
- 'entries.*.quarantine.expires_at',
- 'entries.*.quarantine.created_at',
- ])
- )
- .min(1)
- .optional()
- .describe(
- 'Optional subset of response fields to return, each a dot-path from the allowlist. Omit to return all fields. Request only the fields your task needs to keep responses small.'
+const VisualReviewReposFlakinessRetrieveSchema = () => {
+ const VisualReviewReposFlakinessRetrieveParams = orvalSchemas.VisualReviewReposFlakinessRetrieveParams()
+ return z.preprocess(
+ normalizeParamAliases({ id: ['repo_id'] }),
+ VisualReviewReposFlakinessRetrieveParams.omit({ project_id: true })
+ .extend({
+ id: VisualReviewReposFlakinessRetrieveParams.shape['id'].describe(
+ "The repo's UUID, from `visual-review-repos-list`."
),
- })
-)
+ })
+ .extend({
+ fields: z
+ .array(
+ z.enum([
+ 'totals',
+ 'truncated',
+ 'generated_at',
+ 'entries.*.identifier',
+ 'entries.*.run_type',
+ 'entries.*.flakiness_state',
+ 'entries.*.hard_count',
+ 'entries.*.soft_count',
+ 'entries.*.window_runs',
+ 'entries.*.hard_rate',
+ 'entries.*.soft_rate',
+ 'entries.*.headroom',
+ 'entries.*.worst_soft_diff_percentage',
+ 'entries.*.variant_count',
+ 'entries.*.last_flaked_at',
+ 'entries.*.baseline_age_days',
+ 'entries.*.is_quarantined',
+ 'entries.*.needs_decision',
+ 'entries.*.quarantine.reason',
+ 'entries.*.quarantine.expires_at',
+ 'entries.*.quarantine.created_at',
+ ])
+ )
+ .min(1)
+ .optional()
+ .describe(
+ 'Optional subset of response fields to return, each a dot-path from the allowlist. Omit to return all fields. Request only the fields your task needs to keep responses small.'
+ ),
+ })
+ )
+}
const visualReviewReposFlakinessRetrieve = (): ToolBase<
- typeof VisualReviewReposFlakinessRetrieveSchema,
+ ReturnType<typeof VisualReviewReposFlakinessRetrieveSchema>,
WithInformationalResponse<Schemas.FlakinessOverview>
> => ({
name: 'visual-review-repos-flakiness-retrieve',
- schema: VisualReviewReposFlakinessRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof VisualReviewReposFlakinessRetrieveSchema>) => {
+ schema: VisualReviewReposFlakinessRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisualReviewReposFlakinessRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.FlakinessOverview>({
method: 'GET',
@@ -128,15 +108,18 @@ const visualReviewReposFlakinessRetrieve = (): ToolBase<
},
})
-const VisualReviewReposListSchema = VisualReviewReposListQueryParams
+const VisualReviewReposListSchema = () => {
+ const VisualReviewReposListQueryParams = orvalSchemas.VisualReviewReposListQueryParams()
+ return VisualReviewReposListQueryParams
+}
const visualReviewReposList = (): ToolBase<
- typeof VisualReviewReposListSchema,
+ ReturnType<typeof VisualReviewReposListSchema>,
WithPostHogUrl<Schemas.PaginatedRepoList>
> => ({
name: 'visual-review-repos-list',
- schema: VisualReviewReposListSchema,
- handler: async (context: Context, params: z.infer<typeof VisualReviewReposListSchema>) => {
+ schema: VisualReviewReposListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisualReviewReposListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedRepoList>({
method: 'GET',
@@ -150,24 +133,28 @@ const visualReviewReposList = (): ToolBase<
},
})
-const VisualReviewReposQuarantineListSchema = z.preprocess(
- normalizeParamAliases({ id: ['repo_id'] }),
- VisualReviewReposQuarantineListParams.omit({ project_id: true })
- .extend(VisualReviewReposQuarantineListQueryParams.shape)
- .extend({
- id: VisualReviewReposQuarantineListParams.shape['id'].describe(
- "The repo's UUID, from `visual-review-repos-list`."
- ),
- })
-)
+const VisualReviewReposQuarantineListSchema = () => {
+ const VisualReviewReposQuarantineListParams = orvalSchemas.VisualReviewReposQuarantineListParams()
+ const VisualReviewReposQuarantineListQueryParams = orvalSchemas.VisualReviewReposQuarantineListQueryParams()
+ return z.preprocess(
+ normalizeParamAliases({ id: ['repo_id'] }),
+ VisualReviewReposQuarantineListParams.omit({ project_id: true })
+ .extend(VisualReviewReposQuarantineListQueryParams.shape)
+ .extend({
+ id: VisualReviewReposQuarantineListParams.shape['id'].describe(
+ "The repo's UUID, from `visual-review-repos-list`."
+ ),
+ })
+ )
+}
const visualReviewReposQuarantineList = (): ToolBase<
- typeof VisualReviewReposQuarantineListSchema,
+ ReturnType<typeof VisualReviewReposQuarantineListSchema>,
WithInformationalResponse<WithPostHogUrl<Schemas.PaginatedQuarantinedIdentifierEntryList>>
> => ({
name: 'visual-review-repos-quarantine-list',
- schema: VisualReviewReposQuarantineListSchema,
- handler: async (context: Context, params: z.infer<typeof VisualReviewReposQuarantineListSchema>) => {
+ schema: VisualReviewReposQuarantineListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisualReviewReposQuarantineListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedQuarantinedIdentifierEntryList>({
method: 'GET',
@@ -187,12 +174,15 @@ const visualReviewReposQuarantineList = (): ToolBase<
},
})
-const VisualReviewReposRetrieveSchema = VisualReviewReposRetrieveParams.omit({ project_id: true })
+const VisualReviewReposRetrieveSchema = () => {
+ const VisualReviewReposRetrieveParams = orvalSchemas.VisualReviewReposRetrieveParams()
+ return VisualReviewReposRetrieveParams.omit({ project_id: true })
+}
-const visualReviewReposRetrieve = (): ToolBase<typeof VisualReviewReposRetrieveSchema, Schemas.Repo> => ({
+const visualReviewReposRetrieve = (): ToolBase<ReturnType<typeof VisualReviewReposRetrieveSchema>, Schemas.Repo> => ({
name: 'visual-review-repos-retrieve',
- schema: VisualReviewReposRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof VisualReviewReposRetrieveSchema>) => {
+ schema: VisualReviewReposRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisualReviewReposRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Repo>({
method: 'GET',
@@ -202,22 +192,28 @@ const visualReviewReposRetrieve = (): ToolBase<typeof VisualReviewReposRetrieveS
},
})
-const VisualReviewReposRunsCountsRetrieveSchema = z.preprocess(
- normalizeParamAliases({ repo_id: ['id'] }),
- VisualReviewReposRunsCountsRetrieveParams.omit({ project_id: true }).extend({
- repo_id: VisualReviewReposRunsCountsRetrieveParams.shape['repo_id'].describe(
- "The repo's UUID, from `visual-review-repos-list`."
- ),
- })
-)
+const VisualReviewReposRunsCountsRetrieveSchema = () => {
+ const VisualReviewReposRunsCountsRetrieveParams = orvalSchemas.VisualReviewReposRunsCountsRetrieveParams()
+ return z.preprocess(
+ normalizeParamAliases({ repo_id: ['id'] }),
+ VisualReviewReposRunsCountsRetrieveParams.omit({ project_id: true }).extend({
+ repo_id: VisualReviewReposRunsCountsRetrieveParams.shape['repo_id'].describe(
+ "The repo's UUID, from `visual-review-repos-list`."
+ ),
+ })
+ )
+}
const visualReviewReposRunsCountsRetrieve = (): ToolBase<
- typeof VisualReviewReposRunsCountsRetrieveSchema,
+ ReturnType<typeof VisualReviewReposRunsCountsRetrieveSchema>,
Schemas.ReviewStateCounts
> => ({
name: 'visual-review-repos-runs-counts-retrieve',
- schema: VisualReviewReposRunsCountsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof VisualReviewReposRunsCountsRetrieveSchema>) => {
+ schema: VisualReviewReposRunsCountsRetrieveSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof VisualReviewReposRunsCountsRetrieveSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ReviewStateCounts>({
method: 'GET',
@@ -227,24 +223,28 @@ const visualReviewReposRunsCountsRetrieve = (): ToolBase<
},
})
-const VisualReviewReposRunsListSchema = z.preprocess(
- normalizeParamAliases({ repo_id: ['id'] }),
- VisualReviewReposRunsListParams.omit({ project_id: true })
- .extend(VisualReviewReposRunsListQueryParams.shape)
- .extend({
- repo_id: VisualReviewReposRunsListParams.shape['repo_id'].describe(
- "The repo's UUID, from `visual-review-repos-list`."
- ),
- })
-)
+const VisualReviewReposRunsListSchema = () => {
+ const VisualReviewReposRunsListParams = orvalSchemas.VisualReviewReposRunsListParams()
+ const VisualReviewReposRunsListQueryParams = orvalSchemas.VisualReviewReposRunsListQueryParams()
+ return z.preprocess(
+ normalizeParamAliases({ repo_id: ['id'] }),
+ VisualReviewReposRunsListParams.omit({ project_id: true })
+ .extend(VisualReviewReposRunsListQueryParams.shape)
+ .extend({
+ repo_id: VisualReviewReposRunsListParams.shape['repo_id'].describe(
+ "The repo's UUID, from `visual-review-repos-list`."
+ ),
+ })
+ )
+}
const visualReviewReposRunsList = (): ToolBase<
- typeof VisualReviewReposRunsListSchema,
+ ReturnType<typeof VisualReviewReposRunsListSchema>,
WithPostHogUrl<Schemas.PaginatedRunList>
> => ({
name: 'visual-review-repos-runs-list',
- schema: VisualReviewReposRunsListSchema,
- handler: async (context: Context, params: z.infer<typeof VisualReviewReposRunsListSchema>) => {
+ schema: VisualReviewReposRunsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisualReviewReposRunsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedRunList>({
method: 'GET',
@@ -271,14 +271,21 @@ const visualReviewReposRunsList = (): ToolBase<
},
})
-const VisualReviewRunsApproveCreateSchema = VisualReviewRunsApproveCreateParams.omit({ project_id: true }).extend(
- VisualReviewRunsApproveCreateBody.shape
-)
+const VisualReviewRunsApproveCreateSchema = () => {
+ const VisualReviewRunsApproveCreateBody = orvalSchemas.VisualReviewRunsApproveCreateBody()
+ const VisualReviewRunsApproveCreateParams = orvalSchemas.VisualReviewRunsApproveCreateParams()
+ return VisualReviewRunsApproveCreateParams.omit({ project_id: true }).extend(
+ VisualReviewRunsApproveCreateBody.shape
+ )
+}
-const visualReviewRunsApproveCreate = (): ToolBase<typeof VisualReviewRunsApproveCreateSchema, Schemas.Run> => ({
+const visualReviewRunsApproveCreate = (): ToolBase<
+ ReturnType<typeof VisualReviewRunsApproveCreateSchema>,
+ Schemas.Run
+> => ({
name: 'visual-review-runs-approve-create',
- schema: VisualReviewRunsApproveCreateSchema,
- handler: async (context: Context, params: z.infer<typeof VisualReviewRunsApproveCreateSchema>) => {
+ schema: VisualReviewRunsApproveCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisualReviewRunsApproveCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.snapshots !== undefined) {
@@ -293,16 +300,15 @@ const visualReviewRunsApproveCreate = (): ToolBase<typeof VisualReviewRunsApprov
},
})
-const VisualReviewRunsCountsRetrieveSchema = z.object({})
+const VisualReviewRunsCountsRetrieveSchema = () => z.object({})
const visualReviewRunsCountsRetrieve = (): ToolBase<
- typeof VisualReviewRunsCountsRetrieveSchema,
+ ReturnType<typeof VisualReviewRunsCountsRetrieveSchema>,
Schemas.ReviewStateCounts
> => ({
name: 'visual-review-runs-counts-retrieve',
- schema: VisualReviewRunsCountsRetrieveSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof VisualReviewRunsCountsRetrieveSchema>) => {
+ schema: VisualReviewRunsCountsRetrieveSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof VisualReviewRunsCountsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ReviewStateCounts>({
method: 'GET',
@@ -312,17 +318,21 @@ const visualReviewRunsCountsRetrieve = (): ToolBase<
},
})
-const VisualReviewRunsFinalizeCreateSchema = VisualReviewRunsFinalizeCreateParams.omit({ project_id: true }).extend(
- VisualReviewRunsFinalizeCreateBody.shape
-)
+const VisualReviewRunsFinalizeCreateSchema = () => {
+ const VisualReviewRunsFinalizeCreateBody = orvalSchemas.VisualReviewRunsFinalizeCreateBody()
+ const VisualReviewRunsFinalizeCreateParams = orvalSchemas.VisualReviewRunsFinalizeCreateParams()
+ return VisualReviewRunsFinalizeCreateParams.omit({ project_id: true }).extend(
+ VisualReviewRunsFinalizeCreateBody.shape
+ )
+}
const visualReviewRunsFinalizeCreate = (): ToolBase<
- typeof VisualReviewRunsFinalizeCreateSchema,
+ ReturnType<typeof VisualReviewRunsFinalizeCreateSchema>,
Schemas.FinalizeResult
> => ({
name: 'visual-review-runs-finalize-create',
- schema: VisualReviewRunsFinalizeCreateSchema,
- handler: async (context: Context, params: z.infer<typeof VisualReviewRunsFinalizeCreateSchema>) => {
+ schema: VisualReviewRunsFinalizeCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisualReviewRunsFinalizeCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.approve_all !== undefined) {
@@ -343,15 +353,18 @@ const visualReviewRunsFinalizeCreate = (): ToolBase<
},
})
-const VisualReviewRunsListSchema = VisualReviewRunsListQueryParams
+const VisualReviewRunsListSchema = () => {
+ const VisualReviewRunsListQueryParams = orvalSchemas.VisualReviewRunsListQueryParams()
+ return VisualReviewRunsListQueryParams
+}
const visualReviewRunsList = (): ToolBase<
- typeof VisualReviewRunsListSchema,
+ ReturnType<typeof VisualReviewRunsListSchema>,
WithPostHogUrl<Schemas.PaginatedRunList>
> => ({
name: 'visual-review-runs-list',
- schema: VisualReviewRunsListSchema,
- handler: async (context: Context, params: z.infer<typeof VisualReviewRunsListSchema>) => {
+ schema: VisualReviewRunsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisualReviewRunsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedRunList>({
method: 'GET',
@@ -381,12 +394,18 @@ const visualReviewRunsList = (): ToolBase<
},
})
-const VisualReviewRunsRetrieveSchema = VisualReviewRunsRetrieveParams.omit({ project_id: true })
+const VisualReviewRunsRetrieveSchema = () => {
+ const VisualReviewRunsRetrieveParams = orvalSchemas.VisualReviewRunsRetrieveParams()
+ return VisualReviewRunsRetrieveParams.omit({ project_id: true })
+}
-const visualReviewRunsRetrieve = (): ToolBase<typeof VisualReviewRunsRetrieveSchema, WithPostHogUrl<Schemas.Run>> => ({
+const visualReviewRunsRetrieve = (): ToolBase<
+ ReturnType<typeof VisualReviewRunsRetrieveSchema>,
+ WithPostHogUrl<Schemas.Run>
+> => ({
name: 'visual-review-runs-retrieve',
- schema: VisualReviewRunsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof VisualReviewRunsRetrieveSchema>) => {
+ schema: VisualReviewRunsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisualReviewRunsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.Run>({
method: 'GET',
@@ -396,17 +415,24 @@ const visualReviewRunsRetrieve = (): ToolBase<typeof VisualReviewRunsRetrieveSch
},
})
-const VisualReviewRunsSnapshotHistoryListSchema = VisualReviewRunsSnapshotHistoryListParams.omit({
- project_id: true,
-}).extend(VisualReviewRunsSnapshotHistoryListQueryParams.shape)
+const VisualReviewRunsSnapshotHistoryListSchema = () => {
+ const VisualReviewRunsSnapshotHistoryListParams = orvalSchemas.VisualReviewRunsSnapshotHistoryListParams()
+ const VisualReviewRunsSnapshotHistoryListQueryParams = orvalSchemas.VisualReviewRunsSnapshotHistoryListQueryParams()
+ return VisualReviewRunsSnapshotHistoryListParams.omit({ project_id: true }).extend(
+ VisualReviewRunsSnapshotHistoryListQueryParams.shape
+ )
+}
const visualReviewRunsSnapshotHistoryList = (): ToolBase<
- typeof VisualReviewRunsSnapshotHistoryListSchema,
+ ReturnType<typeof VisualReviewRunsSnapshotHistoryListSchema>,
Schemas.PaginatedSnapshotHistoryEntryList
> => ({
name: 'visual-review-runs-snapshot-history-list',
- schema: VisualReviewRunsSnapshotHistoryListSchema,
- handler: async (context: Context, params: z.infer<typeof VisualReviewRunsSnapshotHistoryListSchema>) => {
+ schema: VisualReviewRunsSnapshotHistoryListSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof VisualReviewRunsSnapshotHistoryListSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedSnapshotHistoryEntryList>({
method: 'GET',
@@ -421,18 +447,22 @@ const visualReviewRunsSnapshotHistoryList = (): ToolBase<
},
})
-const VisualReviewRunsSnapshotsListSchema = VisualReviewRunsSnapshotsListParams.omit({ project_id: true }).extend(
- VisualReviewRunsSnapshotsListQueryParams.shape
-)
+const VisualReviewRunsSnapshotsListSchema = () => {
+ const VisualReviewRunsSnapshotsListParams = orvalSchemas.VisualReviewRunsSnapshotsListParams()
+ const VisualReviewRunsSnapshotsListQueryParams = orvalSchemas.VisualReviewRunsSnapshotsListQueryParams()
+ return VisualReviewRunsSnapshotsListParams.omit({ project_id: true }).extend(
+ VisualReviewRunsSnapshotsListQueryParams.shape
+ )
+}
const visualReviewRunsSnapshotsList = (): ToolBase<
- typeof VisualReviewRunsSnapshotsListSchema,
+ ReturnType<typeof VisualReviewRunsSnapshotsListSchema>,
WithPostHogUrl<Schemas.PaginatedSnapshotList>
> =>
withUiApp('visual-review-snapshots', {
name: 'visual-review-runs-snapshots-list',
- schema: VisualReviewRunsSnapshotsListSchema,
- handler: async (context: Context, params: z.infer<typeof VisualReviewRunsSnapshotsListSchema>) => {
+ schema: VisualReviewRunsSnapshotsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisualReviewRunsSnapshotsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedSnapshotList>({
method: 'GET',
@@ -447,14 +477,21 @@ const visualReviewRunsSnapshotsList = (): ToolBase<
},
})
-const VisualReviewRunsTolerateCreateSchema = VisualReviewRunsTolerateCreateParams.omit({ project_id: true }).extend(
- VisualReviewRunsTolerateCreateBody.shape
-)
+const VisualReviewRunsTolerateCreateSchema = () => {
+ const VisualReviewRunsTolerateCreateBody = orvalSchemas.VisualReviewRunsTolerateCreateBody()
+ const VisualReviewRunsTolerateCreateParams = orvalSchemas.VisualReviewRunsTolerateCreateParams()
+ return VisualReviewRunsTolerateCreateParams.omit({ project_id: true }).extend(
+ VisualReviewRunsTolerateCreateBody.shape
+ )
+}
-const visualReviewRunsTolerateCreate = (): ToolBase<typeof VisualReviewRunsTolerateCreateSchema, Schemas.Snapshot> => ({
+const visualReviewRunsTolerateCreate = (): ToolBase<
+ ReturnType<typeof VisualReviewRunsTolerateCreateSchema>,
+ Schemas.Snapshot
+> => ({
name: 'visual-review-runs-tolerate-create',
- schema: VisualReviewRunsTolerateCreateSchema,
- handler: async (context: Context, params: z.infer<typeof VisualReviewRunsTolerateCreateSchema>) => {
+ schema: VisualReviewRunsTolerateCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof VisualReviewRunsTolerateCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.snapshot_id !== undefined) {
@@ -469,17 +506,24 @@ const visualReviewRunsTolerateCreate = (): ToolBase<typeof VisualReviewRunsToler
},
})
-const VisualReviewRunsToleratedHashesListSchema = VisualReviewRunsToleratedHashesListParams.omit({
- project_id: true,
-}).extend(VisualReviewRunsToleratedHashesListQueryParams.shape)
+const VisualReviewRunsToleratedHashesListSchema = () => {
+ const VisualReviewRunsToleratedHashesListParams = orvalSchemas.VisualReviewRunsToleratedHashesListParams()
+ const VisualReviewRunsToleratedHashesListQueryParams = orvalSchemas.VisualReviewRunsToleratedHashesListQueryParams()
+ return VisualReviewRunsToleratedHashesListParams.omit({ project_id: true }).extend(
+ VisualReviewRunsToleratedHashesListQueryParams.shape
+ )
+}
const visualReviewRunsToleratedHashesList = (): ToolBase<
- typeof VisualReviewRunsToleratedHashesListSchema,
+ ReturnType<typeof VisualReviewRunsToleratedHashesListSchema>,
Schemas.PaginatedToleratedHashEntryList
> => ({
name: 'visual-review-runs-tolerated-hashes-list',
- schema: VisualReviewRunsToleratedHashesListSchema,
- handler: async (context: Context, params: z.infer<typeof VisualReviewRunsToleratedHashesListSchema>) => {
+ schema: VisualReviewRunsToleratedHashesListSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof VisualReviewRunsToleratedHashesListSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedToleratedHashEntryList>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/warehouse_sources.ts b/services/mcp/src/tools/generated/warehouse_sources.ts
index 7ed66e04dd23..2c0c29f2eedf 100644
--- a/services/mcp/src/tools/generated/warehouse_sources.ts
+++ b/services/mcp/src/tools/generated/warehouse_sources.ts
@@ -2,59 +2,24 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- ExternalDataDestinationsListQueryParams,
- ExternalDataDestinationsRetrieveParams,
- ExternalDataSchemasCancelCreateParams,
- ExternalDataSchemasDeleteDataDestroyParams,
- ExternalDataSchemasDestinationsRetrieveParams,
- ExternalDataSchemasIncrementalFieldsCreateBody,
- ExternalDataSchemasIncrementalFieldsCreateParams,
- ExternalDataSchemasListQueryParams,
- ExternalDataSchemasPartialUpdateBody,
- ExternalDataSchemasPartialUpdateParams,
- ExternalDataSchemasReloadCreateParams,
- ExternalDataSchemasResyncCreateParams,
- ExternalDataSchemasRetrieveParams,
- ExternalDataSourcesConnectLinkRetrieveQueryParams,
- ExternalDataSourcesCreateBody,
- ExternalDataSourcesCreateWebhookCreateBody,
- ExternalDataSourcesCreateWebhookCreateParams,
- ExternalDataSourcesDeleteWebhookCreateBody,
- ExternalDataSourcesDeleteWebhookCreateParams,
- ExternalDataSourcesDestinationsRetrieveParams,
- ExternalDataSourcesDestroyParams,
- ExternalDataSourcesListQueryParams,
- ExternalDataSourcesPartialUpdateBody,
- ExternalDataSourcesPartialUpdateParams,
- ExternalDataSourcesRefreshSchemasCreateBody,
- ExternalDataSourcesRefreshSchemasCreateParams,
- ExternalDataSourcesReloadCreateBody,
- ExternalDataSourcesReloadCreateParams,
- ExternalDataSourcesRepairCdcCreateParams,
- ExternalDataSourcesRetrieveParams,
- ExternalDataSourcesSetupCreateBody,
- ExternalDataSourcesStoredCredentialsListQueryParams,
- ExternalDataSourcesUpdateWebhookInputsCreateBody,
- ExternalDataSourcesUpdateWebhookInputsCreateParams,
- ExternalDataSourcesWebhookInfoRetrieveParams,
- ExternalDataSourcesWizardRetrieveQueryParams,
-} from '@/generated/warehouse_sources/api'
+import * as orvalSchemas from '@/generated/warehouse_sources/api'
import { ExternalDataSourcePayloadSchema, ExternalDataSourceTypeSchema } from '@/schema/tool-inputs'
import { withPostHogUrl, omitResponseFields, pickResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const DataWarehouseSourceConnectLinkSchema = ExternalDataSourcesConnectLinkRetrieveQueryParams.extend({
- source_type: ExternalDataSourceTypeSchema,
-})
+const DataWarehouseSourceConnectLinkSchema = () => {
+ const ExternalDataSourcesConnectLinkRetrieveQueryParams =
+ orvalSchemas.ExternalDataSourcesConnectLinkRetrieveQueryParams()
+ return ExternalDataSourcesConnectLinkRetrieveQueryParams.extend({ source_type: ExternalDataSourceTypeSchema })
+}
const dataWarehouseSourceConnectLink = (): ToolBase<
- typeof DataWarehouseSourceConnectLinkSchema,
+ ReturnType<typeof DataWarehouseSourceConnectLinkSchema>,
Schemas.SourceConnectLink
> => ({
name: 'data-warehouse-source-connect-link',
- schema: DataWarehouseSourceConnectLinkSchema,
- handler: async (context: Context, params: z.infer<typeof DataWarehouseSourceConnectLinkSchema>) => {
+ schema: DataWarehouseSourceConnectLinkSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataWarehouseSourceConnectLinkSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SourceConnectLink>({
method: 'GET',
@@ -67,14 +32,18 @@ const dataWarehouseSourceConnectLink = (): ToolBase<
},
})
-const DataWarehouseSourceSetupSchema = ExternalDataSourcesSetupCreateBody.extend({
- source_type: ExternalDataSourceTypeSchema,
-})
+const DataWarehouseSourceSetupSchema = () => {
+ const ExternalDataSourcesSetupCreateBody = orvalSchemas.ExternalDataSourcesSetupCreateBody()
+ return ExternalDataSourcesSetupCreateBody.extend({ source_type: ExternalDataSourceTypeSchema })
+}
-const dataWarehouseSourceSetup = (): ToolBase<typeof DataWarehouseSourceSetupSchema, Schemas.SourceSetupResponse> => ({
+const dataWarehouseSourceSetup = (): ToolBase<
+ ReturnType<typeof DataWarehouseSourceSetupSchema>,
+ Schemas.SourceSetupResponse
+> => ({
name: 'data-warehouse-source-setup',
- schema: DataWarehouseSourceSetupSchema,
- handler: async (context: Context, params: z.infer<typeof DataWarehouseSourceSetupSchema>) => {
+ schema: DataWarehouseSourceSetupSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataWarehouseSourceSetupSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.source_type !== undefined) {
@@ -101,15 +70,19 @@ const dataWarehouseSourceSetup = (): ToolBase<typeof DataWarehouseSourceSetupSch
},
})
-const DataWarehouseStoredCredentialsListSchema = ExternalDataSourcesStoredCredentialsListQueryParams
+const DataWarehouseStoredCredentialsListSchema = () => {
+ const ExternalDataSourcesStoredCredentialsListQueryParams =
+ orvalSchemas.ExternalDataSourcesStoredCredentialsListQueryParams()
+ return ExternalDataSourcesStoredCredentialsListQueryParams
+}
const dataWarehouseStoredCredentialsList = (): ToolBase<
- typeof DataWarehouseStoredCredentialsListSchema,
+ ReturnType<typeof DataWarehouseStoredCredentialsListSchema>,
WithPostHogUrl<Schemas.SourceCredential[]>
> => ({
name: 'data-warehouse-stored-credentials-list',
- schema: DataWarehouseStoredCredentialsListSchema,
- handler: async (context: Context, params: z.infer<typeof DataWarehouseStoredCredentialsListSchema>) => {
+ schema: DataWarehouseStoredCredentialsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof DataWarehouseStoredCredentialsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SourceCredential[]>({
method: 'GET',
@@ -123,15 +96,18 @@ const dataWarehouseStoredCredentialsList = (): ToolBase<
},
})
-const ExternalDataDestinationsListSchema = ExternalDataDestinationsListQueryParams
+const ExternalDataDestinationsListSchema = () => {
+ const ExternalDataDestinationsListQueryParams = orvalSchemas.ExternalDataDestinationsListQueryParams()
+ return ExternalDataDestinationsListQueryParams
+}
const externalDataDestinationsList = (): ToolBase<
- typeof ExternalDataDestinationsListSchema,
+ ReturnType<typeof ExternalDataDestinationsListSchema>,
Schemas.PaginatedExternalDataDestinationList
> => ({
name: 'external-data-destinations-list',
- schema: ExternalDataDestinationsListSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataDestinationsListSchema>) => {
+ schema: ExternalDataDestinationsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExternalDataDestinationsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedExternalDataDestinationList>({
method: 'GET',
@@ -145,15 +121,18 @@ const externalDataDestinationsList = (): ToolBase<
},
})
-const ExternalDataDestinationsRetrieveSchema = ExternalDataDestinationsRetrieveParams.omit({ project_id: true })
+const ExternalDataDestinationsRetrieveSchema = () => {
+ const ExternalDataDestinationsRetrieveParams = orvalSchemas.ExternalDataDestinationsRetrieveParams()
+ return ExternalDataDestinationsRetrieveParams.omit({ project_id: true })
+}
const externalDataDestinationsRetrieve = (): ToolBase<
- typeof ExternalDataDestinationsRetrieveSchema,
+ ReturnType<typeof ExternalDataDestinationsRetrieveSchema>,
WithPostHogUrl<Schemas.ExternalDataDestination>
> => ({
name: 'external-data-destinations-retrieve',
- schema: ExternalDataDestinationsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataDestinationsRetrieveSchema>) => {
+ schema: ExternalDataDestinationsRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExternalDataDestinationsRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ExternalDataDestination>({
method: 'GET',
@@ -163,12 +142,15 @@ const externalDataDestinationsRetrieve = (): ToolBase<
},
})
-const ExternalDataSchemasCancelSchema = ExternalDataSchemasCancelCreateParams.omit({ project_id: true })
+const ExternalDataSchemasCancelSchema = () => {
+ const ExternalDataSchemasCancelCreateParams = orvalSchemas.ExternalDataSchemasCancelCreateParams()
+ return ExternalDataSchemasCancelCreateParams.omit({ project_id: true })
+}
-const externalDataSchemasCancel = (): ToolBase<typeof ExternalDataSchemasCancelSchema, unknown> => ({
+const externalDataSchemasCancel = (): ToolBase<ReturnType<typeof ExternalDataSchemasCancelSchema>, unknown> => ({
name: 'external-data-schemas-cancel',
- schema: ExternalDataSchemasCancelSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSchemasCancelSchema>) => {
+ schema: ExternalDataSchemasCancelSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExternalDataSchemasCancelSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'POST',
@@ -178,12 +160,18 @@ const externalDataSchemasCancel = (): ToolBase<typeof ExternalDataSchemasCancelS
},
})
-const ExternalDataSchemasDeleteDataSchema = ExternalDataSchemasDeleteDataDestroyParams.omit({ project_id: true })
+const ExternalDataSchemasDeleteDataSchema = () => {
+ const ExternalDataSchemasDeleteDataDestroyParams = orvalSchemas.ExternalDataSchemasDeleteDataDestroyParams()
+ return ExternalDataSchemasDeleteDataDestroyParams.omit({ project_id: true })
+}
-const externalDataSchemasDeleteData = (): ToolBase<typeof ExternalDataSchemasDeleteDataSchema, unknown> => ({
+const externalDataSchemasDeleteData = (): ToolBase<
+ ReturnType<typeof ExternalDataSchemasDeleteDataSchema>,
+ unknown
+> => ({
name: 'external-data-schemas-delete-data',
- schema: ExternalDataSchemasDeleteDataSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSchemasDeleteDataSchema>) => {
+ schema: ExternalDataSchemasDeleteDataSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExternalDataSchemasDeleteDataSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -193,17 +181,21 @@ const externalDataSchemasDeleteData = (): ToolBase<typeof ExternalDataSchemasDel
},
})
-const ExternalDataSchemasDestinationsRetrieveSchema = ExternalDataSchemasDestinationsRetrieveParams.omit({
- project_id: true,
-})
+const ExternalDataSchemasDestinationsRetrieveSchema = () => {
+ const ExternalDataSchemasDestinationsRetrieveParams = orvalSchemas.ExternalDataSchemasDestinationsRetrieveParams()
+ return ExternalDataSchemasDestinationsRetrieveParams.omit({ project_id: true })
+}
const externalDataSchemasDestinationsRetrieve = (): ToolBase<
- typeof ExternalDataSchemasDestinationsRetrieveSchema,
+ ReturnType<typeof ExternalDataSchemasDestinationsRetrieveSchema>,
Schemas.SchemaDestinations
> => ({
name: 'external-data-schemas-destinations-retrieve',
- schema: ExternalDataSchemasDestinationsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSchemasDestinationsRetrieveSchema>) => {
+ schema: ExternalDataSchemasDestinationsRetrieveSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ExternalDataSchemasDestinationsRetrieveSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SchemaDestinations>({
method: 'GET',
@@ -213,17 +205,25 @@ const externalDataSchemasDestinationsRetrieve = (): ToolBase<
},
})
-const ExternalDataSchemasIncrementalFieldsCreateSchema = ExternalDataSchemasIncrementalFieldsCreateParams.omit({
- project_id: true,
-}).extend(ExternalDataSchemasIncrementalFieldsCreateBody.shape)
+const ExternalDataSchemasIncrementalFieldsCreateSchema = () => {
+ const ExternalDataSchemasIncrementalFieldsCreateBody = orvalSchemas.ExternalDataSchemasIncrementalFieldsCreateBody()
+ const ExternalDataSchemasIncrementalFieldsCreateParams =
+ orvalSchemas.ExternalDataSchemasIncrementalFieldsCreateParams()
+ return ExternalDataSchemasIncrementalFieldsCreateParams.omit({ project_id: true }).extend(
+ ExternalDataSchemasIncrementalFieldsCreateBody.shape
+ )
+}
const externalDataSchemasIncrementalFieldsCreate = (): ToolBase<
- typeof ExternalDataSchemasIncrementalFieldsCreateSchema,
+ ReturnType<typeof ExternalDataSchemasIncrementalFieldsCreateSchema>,
unknown
> => ({
name: 'external-data-schemas-incremental-fields-create',
- schema: ExternalDataSchemasIncrementalFieldsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSchemasIncrementalFieldsCreateSchema>) => {
+ schema: ExternalDataSchemasIncrementalFieldsCreateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ExternalDataSchemasIncrementalFieldsCreateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.should_sync !== undefined) {
@@ -271,15 +271,18 @@ const externalDataSchemasIncrementalFieldsCreate = (): ToolBase<
},
})
-const ExternalDataSchemasListSchema = ExternalDataSchemasListQueryParams
+const ExternalDataSchemasListSchema = () => {
+ const ExternalDataSchemasListQueryParams = orvalSchemas.ExternalDataSchemasListQueryParams()
+ return ExternalDataSchemasListQueryParams
+}
const externalDataSchemasList = (): ToolBase<
- typeof ExternalDataSchemasListSchema,
+ ReturnType<typeof ExternalDataSchemasListSchema>,
WithPostHogUrl<Schemas.PaginatedExternalDataSchemaList>
> => ({
name: 'external-data-schemas-list',
- schema: ExternalDataSchemasListSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSchemasListSchema>) => {
+ schema: ExternalDataSchemasListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExternalDataSchemasListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedExternalDataSchemaList>({
method: 'GET',
@@ -300,17 +303,21 @@ const externalDataSchemasList = (): ToolBase<
},
})
-const ExternalDataSchemasPartialUpdateSchema = ExternalDataSchemasPartialUpdateParams.omit({ project_id: true }).extend(
- ExternalDataSchemasPartialUpdateBody.shape
-)
+const ExternalDataSchemasPartialUpdateSchema = () => {
+ const ExternalDataSchemasPartialUpdateBody = orvalSchemas.ExternalDataSchemasPartialUpdateBody()
+ const ExternalDataSchemasPartialUpdateParams = orvalSchemas.ExternalDataSchemasPartialUpdateParams()
+ return ExternalDataSchemasPartialUpdateParams.omit({ project_id: true }).extend(
+ ExternalDataSchemasPartialUpdateBody.shape
+ )
+}
const externalDataSchemasPartialUpdate = (): ToolBase<
- typeof ExternalDataSchemasPartialUpdateSchema,
+ ReturnType<typeof ExternalDataSchemasPartialUpdateSchema>,
Schemas.ExternalDataSchema
> => ({
name: 'external-data-schemas-partial-update',
- schema: ExternalDataSchemasPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSchemasPartialUpdateSchema>) => {
+ schema: ExternalDataSchemasPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExternalDataSchemasPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.should_sync !== undefined) {
@@ -358,12 +365,15 @@ const externalDataSchemasPartialUpdate = (): ToolBase<
},
})
-const ExternalDataSchemasReloadSchema = ExternalDataSchemasReloadCreateParams.omit({ project_id: true })
+const ExternalDataSchemasReloadSchema = () => {
+ const ExternalDataSchemasReloadCreateParams = orvalSchemas.ExternalDataSchemasReloadCreateParams()
+ return ExternalDataSchemasReloadCreateParams.omit({ project_id: true })
+}
-const externalDataSchemasReload = (): ToolBase<typeof ExternalDataSchemasReloadSchema, unknown> => ({
+const externalDataSchemasReload = (): ToolBase<ReturnType<typeof ExternalDataSchemasReloadSchema>, unknown> => ({
name: 'external-data-schemas-reload',
- schema: ExternalDataSchemasReloadSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSchemasReloadSchema>) => {
+ schema: ExternalDataSchemasReloadSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExternalDataSchemasReloadSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'POST',
@@ -373,12 +383,15 @@ const externalDataSchemasReload = (): ToolBase<typeof ExternalDataSchemasReloadS
},
})
-const ExternalDataSchemasResyncSchema = ExternalDataSchemasResyncCreateParams.omit({ project_id: true })
+const ExternalDataSchemasResyncSchema = () => {
+ const ExternalDataSchemasResyncCreateParams = orvalSchemas.ExternalDataSchemasResyncCreateParams()
+ return ExternalDataSchemasResyncCreateParams.omit({ project_id: true })
+}
-const externalDataSchemasResync = (): ToolBase<typeof ExternalDataSchemasResyncSchema, unknown> => ({
+const externalDataSchemasResync = (): ToolBase<ReturnType<typeof ExternalDataSchemasResyncSchema>, unknown> => ({
name: 'external-data-schemas-resync',
- schema: ExternalDataSchemasResyncSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSchemasResyncSchema>) => {
+ schema: ExternalDataSchemasResyncSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExternalDataSchemasResyncSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'POST',
@@ -388,15 +401,18 @@ const externalDataSchemasResync = (): ToolBase<typeof ExternalDataSchemasResyncS
},
})
-const ExternalDataSchemasRetrieveSchema = ExternalDataSchemasRetrieveParams.omit({ project_id: true })
+const ExternalDataSchemasRetrieveSchema = () => {
+ const ExternalDataSchemasRetrieveParams = orvalSchemas.ExternalDataSchemasRetrieveParams()
+ return ExternalDataSchemasRetrieveParams.omit({ project_id: true })
+}
const externalDataSchemasRetrieve = (): ToolBase<
- typeof ExternalDataSchemasRetrieveSchema,
+ ReturnType<typeof ExternalDataSchemasRetrieveSchema>,
Schemas.ExternalDataSchema
> => ({
name: 'external-data-schemas-retrieve',
- schema: ExternalDataSchemasRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSchemasRetrieveSchema>) => {
+ schema: ExternalDataSchemasRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExternalDataSchemasRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ExternalDataSchema>({
method: 'GET',
@@ -406,17 +422,19 @@ const externalDataSchemasRetrieve = (): ToolBase<
},
})
-const ExternalDataSourcesCheckCdcPrerequisitesCreateSchema = z
- .object({})
- .extend({ source_type: ExternalDataSourceTypeSchema })
+const ExternalDataSourcesCheckCdcPrerequisitesCreateSchema = () =>
+ z.object({}).extend({ source_type: ExternalDataSourceTypeSchema })
const externalDataSourcesCheckCdcPrerequisitesCreate = (): ToolBase<
- typeof ExternalDataSourcesCheckCdcPrerequisitesCreateSchema,
+ ReturnType<typeof ExternalDataSourcesCheckCdcPrerequisitesCreateSchema>,
unknown
> => ({
name: 'external-data-sources-check-cdc-prerequisites-create',
- schema: ExternalDataSourcesCheckCdcPrerequisitesCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSourcesCheckCdcPrerequisitesCreateSchema>) => {
+ schema: ExternalDataSourcesCheckCdcPrerequisitesCreateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ExternalDataSourcesCheckCdcPrerequisitesCreateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.source_type !== undefined) {
@@ -431,16 +449,18 @@ const externalDataSourcesCheckCdcPrerequisitesCreate = (): ToolBase<
},
})
-const ExternalDataSourcesConnectionsListSchema = z.object({})
+const ExternalDataSourcesConnectionsListSchema = () => z.object({})
const externalDataSourcesConnectionsList = (): ToolBase<
- typeof ExternalDataSourcesConnectionsListSchema,
+ ReturnType<typeof ExternalDataSourcesConnectionsListSchema>,
WithPostHogUrl<Schemas.ExternalDataSourceConnectionOption[]>
> => ({
name: 'external-data-sources-connections-list',
- schema: ExternalDataSourcesConnectionsListSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof ExternalDataSourcesConnectionsListSchema>) => {
+ schema: ExternalDataSourcesConnectionsListSchema(),
+ handler: async (
+ context: Context,
+ _params: z.infer<ReturnType<typeof ExternalDataSourcesConnectionsListSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ExternalDataSourceConnectionOption[]>({
method: 'GET',
@@ -450,18 +470,21 @@ const externalDataSourcesConnectionsList = (): ToolBase<
},
})
-const ExternalDataSourcesCreateSchema = ExternalDataSourcesCreateBody.extend({
- source_type: ExternalDataSourceTypeSchema,
- payload: ExternalDataSourcePayloadSchema,
-})
+const ExternalDataSourcesCreateSchema = () => {
+ const ExternalDataSourcesCreateBody = orvalSchemas.ExternalDataSourcesCreateBody()
+ return ExternalDataSourcesCreateBody.extend({
+ source_type: ExternalDataSourceTypeSchema,
+ payload: ExternalDataSourcePayloadSchema,
+ })
+}
const externalDataSourcesCreate = (): ToolBase<
- typeof ExternalDataSourcesCreateSchema,
+ ReturnType<typeof ExternalDataSourcesCreateSchema>,
Schemas.ExternalDataSourceCreateResponse
> => ({
name: 'external-data-sources-create',
- schema: ExternalDataSourcesCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSourcesCreateSchema>) => {
+ schema: ExternalDataSourcesCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExternalDataSourcesCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.source_type !== undefined) {
@@ -495,17 +518,24 @@ const externalDataSourcesCreate = (): ToolBase<
},
})
-const ExternalDataSourcesCreateWebhookCreateSchema = ExternalDataSourcesCreateWebhookCreateParams.omit({
- project_id: true,
-}).extend(ExternalDataSourcesCreateWebhookCreateBody.shape)
+const ExternalDataSourcesCreateWebhookCreateSchema = () => {
+ const ExternalDataSourcesCreateWebhookCreateBody = orvalSchemas.ExternalDataSourcesCreateWebhookCreateBody()
+ const ExternalDataSourcesCreateWebhookCreateParams = orvalSchemas.ExternalDataSourcesCreateWebhookCreateParams()
+ return ExternalDataSourcesCreateWebhookCreateParams.omit({ project_id: true }).extend(
+ ExternalDataSourcesCreateWebhookCreateBody.shape
+ )
+}
const externalDataSourcesCreateWebhookCreate = (): ToolBase<
- typeof ExternalDataSourcesCreateWebhookCreateSchema,
+ ReturnType<typeof ExternalDataSourcesCreateWebhookCreateSchema>,
unknown
> => ({
name: 'external-data-sources-create-webhook-create',
- schema: ExternalDataSourcesCreateWebhookCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSourcesCreateWebhookCreateSchema>) => {
+ schema: ExternalDataSourcesCreateWebhookCreateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ExternalDataSourcesCreateWebhookCreateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.created_via !== undefined) {
@@ -544,17 +574,24 @@ const externalDataSourcesCreateWebhookCreate = (): ToolBase<
},
})
-const ExternalDataSourcesDeleteWebhookCreateSchema = ExternalDataSourcesDeleteWebhookCreateParams.omit({
- project_id: true,
-}).extend(ExternalDataSourcesDeleteWebhookCreateBody.shape)
+const ExternalDataSourcesDeleteWebhookCreateSchema = () => {
+ const ExternalDataSourcesDeleteWebhookCreateBody = orvalSchemas.ExternalDataSourcesDeleteWebhookCreateBody()
+ const ExternalDataSourcesDeleteWebhookCreateParams = orvalSchemas.ExternalDataSourcesDeleteWebhookCreateParams()
+ return ExternalDataSourcesDeleteWebhookCreateParams.omit({ project_id: true }).extend(
+ ExternalDataSourcesDeleteWebhookCreateBody.shape
+ )
+}
const externalDataSourcesDeleteWebhookCreate = (): ToolBase<
- typeof ExternalDataSourcesDeleteWebhookCreateSchema,
+ ReturnType<typeof ExternalDataSourcesDeleteWebhookCreateSchema>,
unknown
> => ({
name: 'external-data-sources-delete-webhook-create',
- schema: ExternalDataSourcesDeleteWebhookCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSourcesDeleteWebhookCreateSchema>) => {
+ schema: ExternalDataSourcesDeleteWebhookCreateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ExternalDataSourcesDeleteWebhookCreateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.created_via !== undefined) {
@@ -593,17 +630,21 @@ const externalDataSourcesDeleteWebhookCreate = (): ToolBase<
},
})
-const ExternalDataSourcesDestinationsRetrieveSchema = ExternalDataSourcesDestinationsRetrieveParams.omit({
- project_id: true,
-})
+const ExternalDataSourcesDestinationsRetrieveSchema = () => {
+ const ExternalDataSourcesDestinationsRetrieveParams = orvalSchemas.ExternalDataSourcesDestinationsRetrieveParams()
+ return ExternalDataSourcesDestinationsRetrieveParams.omit({ project_id: true })
+}
const externalDataSourcesDestinationsRetrieve = (): ToolBase<
- typeof ExternalDataSourcesDestinationsRetrieveSchema,
+ ReturnType<typeof ExternalDataSourcesDestinationsRetrieveSchema>,
Schemas.SourceDestinations
> => ({
name: 'external-data-sources-destinations-retrieve',
- schema: ExternalDataSourcesDestinationsRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSourcesDestinationsRetrieveSchema>) => {
+ schema: ExternalDataSourcesDestinationsRetrieveSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ExternalDataSourcesDestinationsRetrieveSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SourceDestinations>({
method: 'GET',
@@ -613,12 +654,15 @@ const externalDataSourcesDestinationsRetrieve = (): ToolBase<
},
})
-const ExternalDataSourcesDestroySchema = ExternalDataSourcesDestroyParams.omit({ project_id: true })
+const ExternalDataSourcesDestroySchema = () => {
+ const ExternalDataSourcesDestroyParams = orvalSchemas.ExternalDataSourcesDestroyParams()
+ return ExternalDataSourcesDestroyParams.omit({ project_id: true })
+}
-const externalDataSourcesDestroy = (): ToolBase<typeof ExternalDataSourcesDestroySchema, unknown> => ({
+const externalDataSourcesDestroy = (): ToolBase<ReturnType<typeof ExternalDataSourcesDestroySchema>, unknown> => ({
name: 'external-data-sources-destroy',
- schema: ExternalDataSourcesDestroySchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSourcesDestroySchema>) => {
+ schema: ExternalDataSourcesDestroySchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExternalDataSourcesDestroySchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'DELETE',
@@ -628,15 +672,18 @@ const externalDataSourcesDestroy = (): ToolBase<typeof ExternalDataSourcesDestro
},
})
-const ExternalDataSourcesListSchema = ExternalDataSourcesListQueryParams
+const ExternalDataSourcesListSchema = () => {
+ const ExternalDataSourcesListQueryParams = orvalSchemas.ExternalDataSourcesListQueryParams()
+ return ExternalDataSourcesListQueryParams
+}
const externalDataSourcesList = (): ToolBase<
- typeof ExternalDataSourcesListSchema,
+ ReturnType<typeof ExternalDataSourcesListSchema>,
WithPostHogUrl<Schemas.PaginatedExternalDataSourceSerializersList>
> => ({
name: 'external-data-sources-list',
- schema: ExternalDataSourcesListSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSourcesListSchema>) => {
+ schema: ExternalDataSourcesListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExternalDataSourcesListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedExternalDataSourceSerializersList>({
method: 'GET',
@@ -651,17 +698,21 @@ const externalDataSourcesList = (): ToolBase<
},
})
-const ExternalDataSourcesPartialUpdateSchema = ExternalDataSourcesPartialUpdateParams.omit({ project_id: true }).extend(
- ExternalDataSourcesPartialUpdateBody.shape
-)
+const ExternalDataSourcesPartialUpdateSchema = () => {
+ const ExternalDataSourcesPartialUpdateBody = orvalSchemas.ExternalDataSourcesPartialUpdateBody()
+ const ExternalDataSourcesPartialUpdateParams = orvalSchemas.ExternalDataSourcesPartialUpdateParams()
+ return ExternalDataSourcesPartialUpdateParams.omit({ project_id: true }).extend(
+ ExternalDataSourcesPartialUpdateBody.shape
+ )
+}
const externalDataSourcesPartialUpdate = (): ToolBase<
- typeof ExternalDataSourcesPartialUpdateSchema,
+ ReturnType<typeof ExternalDataSourcesPartialUpdateSchema>,
Schemas.ExternalDataSourceSerializers
> => ({
name: 'external-data-sources-partial-update',
- schema: ExternalDataSourcesPartialUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSourcesPartialUpdateSchema>) => {
+ schema: ExternalDataSourcesPartialUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExternalDataSourcesPartialUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.created_via !== undefined) {
@@ -700,14 +751,21 @@ const externalDataSourcesPartialUpdate = (): ToolBase<
},
})
-const ExternalDataSourcesRefreshSchemasSchema = ExternalDataSourcesRefreshSchemasCreateParams.omit({
- project_id: true,
-}).extend(ExternalDataSourcesRefreshSchemasCreateBody.shape)
+const ExternalDataSourcesRefreshSchemasSchema = () => {
+ const ExternalDataSourcesRefreshSchemasCreateBody = orvalSchemas.ExternalDataSourcesRefreshSchemasCreateBody()
+ const ExternalDataSourcesRefreshSchemasCreateParams = orvalSchemas.ExternalDataSourcesRefreshSchemasCreateParams()
+ return ExternalDataSourcesRefreshSchemasCreateParams.omit({ project_id: true }).extend(
+ ExternalDataSourcesRefreshSchemasCreateBody.shape
+ )
+}
-const externalDataSourcesRefreshSchemas = (): ToolBase<typeof ExternalDataSourcesRefreshSchemasSchema, unknown> => ({
+const externalDataSourcesRefreshSchemas = (): ToolBase<
+ ReturnType<typeof ExternalDataSourcesRefreshSchemasSchema>,
+ unknown
+> => ({
name: 'external-data-sources-refresh-schemas',
- schema: ExternalDataSourcesRefreshSchemasSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSourcesRefreshSchemasSchema>) => {
+ schema: ExternalDataSourcesRefreshSchemasSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExternalDataSourcesRefreshSchemasSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.created_via !== undefined) {
@@ -731,14 +789,18 @@ const externalDataSourcesRefreshSchemas = (): ToolBase<typeof ExternalDataSource
},
})
-const ExternalDataSourcesReloadSchema = ExternalDataSourcesReloadCreateParams.omit({ project_id: true }).extend(
- ExternalDataSourcesReloadCreateBody.shape
-)
+const ExternalDataSourcesReloadSchema = () => {
+ const ExternalDataSourcesReloadCreateBody = orvalSchemas.ExternalDataSourcesReloadCreateBody()
+ const ExternalDataSourcesReloadCreateParams = orvalSchemas.ExternalDataSourcesReloadCreateParams()
+ return ExternalDataSourcesReloadCreateParams.omit({ project_id: true }).extend(
+ ExternalDataSourcesReloadCreateBody.shape
+ )
+}
-const externalDataSourcesReload = (): ToolBase<typeof ExternalDataSourcesReloadSchema, unknown> => ({
+const externalDataSourcesReload = (): ToolBase<ReturnType<typeof ExternalDataSourcesReloadSchema>, unknown> => ({
name: 'external-data-sources-reload',
- schema: ExternalDataSourcesReloadSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSourcesReloadSchema>) => {
+ schema: ExternalDataSourcesReloadSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExternalDataSourcesReloadSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.created_via !== undefined) {
@@ -762,12 +824,18 @@ const externalDataSourcesReload = (): ToolBase<typeof ExternalDataSourcesReloadS
},
})
-const ExternalDataSourcesRepairCdcCreateSchema = ExternalDataSourcesRepairCdcCreateParams.omit({ project_id: true })
+const ExternalDataSourcesRepairCdcCreateSchema = () => {
+ const ExternalDataSourcesRepairCdcCreateParams = orvalSchemas.ExternalDataSourcesRepairCdcCreateParams()
+ return ExternalDataSourcesRepairCdcCreateParams.omit({ project_id: true })
+}
-const externalDataSourcesRepairCdcCreate = (): ToolBase<typeof ExternalDataSourcesRepairCdcCreateSchema, unknown> => ({
+const externalDataSourcesRepairCdcCreate = (): ToolBase<
+ ReturnType<typeof ExternalDataSourcesRepairCdcCreateSchema>,
+ unknown
+> => ({
name: 'external-data-sources-repair-cdc-create',
- schema: ExternalDataSourcesRepairCdcCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSourcesRepairCdcCreateSchema>) => {
+ schema: ExternalDataSourcesRepairCdcCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExternalDataSourcesRepairCdcCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'POST',
@@ -777,15 +845,18 @@ const externalDataSourcesRepairCdcCreate = (): ToolBase<typeof ExternalDataSourc
},
})
-const ExternalDataSourcesRetrieveSchema = ExternalDataSourcesRetrieveParams.omit({ project_id: true })
+const ExternalDataSourcesRetrieveSchema = () => {
+ const ExternalDataSourcesRetrieveParams = orvalSchemas.ExternalDataSourcesRetrieveParams()
+ return ExternalDataSourcesRetrieveParams.omit({ project_id: true })
+}
const externalDataSourcesRetrieve = (): ToolBase<
- typeof ExternalDataSourcesRetrieveSchema,
+ ReturnType<typeof ExternalDataSourcesRetrieveSchema>,
Schemas.ExternalDataSourceSerializers
> => ({
name: 'external-data-sources-retrieve',
- schema: ExternalDataSourcesRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSourcesRetrieveSchema>) => {
+ schema: ExternalDataSourcesRetrieveSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExternalDataSourcesRetrieveSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ExternalDataSourceSerializers>({
method: 'GET',
@@ -799,17 +870,26 @@ const externalDataSourcesRetrieve = (): ToolBase<
},
})
-const ExternalDataSourcesUpdateWebhookInputsCreateSchema = ExternalDataSourcesUpdateWebhookInputsCreateParams.omit({
- project_id: true,
-}).extend(ExternalDataSourcesUpdateWebhookInputsCreateBody.shape)
+const ExternalDataSourcesUpdateWebhookInputsCreateSchema = () => {
+ const ExternalDataSourcesUpdateWebhookInputsCreateBody =
+ orvalSchemas.ExternalDataSourcesUpdateWebhookInputsCreateBody()
+ const ExternalDataSourcesUpdateWebhookInputsCreateParams =
+ orvalSchemas.ExternalDataSourcesUpdateWebhookInputsCreateParams()
+ return ExternalDataSourcesUpdateWebhookInputsCreateParams.omit({ project_id: true }).extend(
+ ExternalDataSourcesUpdateWebhookInputsCreateBody.shape
+ )
+}
const externalDataSourcesUpdateWebhookInputsCreate = (): ToolBase<
- typeof ExternalDataSourcesUpdateWebhookInputsCreateSchema,
+ ReturnType<typeof ExternalDataSourcesUpdateWebhookInputsCreateSchema>,
unknown
> => ({
name: 'external-data-sources-update-webhook-inputs-create',
- schema: ExternalDataSourcesUpdateWebhookInputsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSourcesUpdateWebhookInputsCreateSchema>) => {
+ schema: ExternalDataSourcesUpdateWebhookInputsCreateSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ExternalDataSourcesUpdateWebhookInputsCreateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.created_via !== undefined) {
@@ -848,17 +928,21 @@ const externalDataSourcesUpdateWebhookInputsCreate = (): ToolBase<
},
})
-const ExternalDataSourcesWebhookInfoRetrieveSchema = ExternalDataSourcesWebhookInfoRetrieveParams.omit({
- project_id: true,
-})
+const ExternalDataSourcesWebhookInfoRetrieveSchema = () => {
+ const ExternalDataSourcesWebhookInfoRetrieveParams = orvalSchemas.ExternalDataSourcesWebhookInfoRetrieveParams()
+ return ExternalDataSourcesWebhookInfoRetrieveParams.omit({ project_id: true })
+}
const externalDataSourcesWebhookInfoRetrieve = (): ToolBase<
- typeof ExternalDataSourcesWebhookInfoRetrieveSchema,
+ ReturnType<typeof ExternalDataSourcesWebhookInfoRetrieveSchema>,
unknown
> => ({
name: 'external-data-sources-webhook-info-retrieve',
- schema: ExternalDataSourcesWebhookInfoRetrieveSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSourcesWebhookInfoRetrieveSchema>) => {
+ schema: ExternalDataSourcesWebhookInfoRetrieveSchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof ExternalDataSourcesWebhookInfoRetrieveSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'GET',
@@ -868,20 +952,23 @@ const externalDataSourcesWebhookInfoRetrieve = (): ToolBase<
},
})
-const ExternalDataSourcesWizardSchema = ExternalDataSourcesWizardRetrieveQueryParams.extend({
- fields: z
- .array(z.enum(['*.name', '*.caption', '*.docsUrl', '*.featured', '*.unreleasedSource', '*.fields']))
- .min(1)
- .optional()
- .describe(
- 'Optional subset of response fields to return, each a dot-path from the allowlist. Omit to return all fields. Request only the fields your task needs to keep responses small.'
- ),
-})
+const ExternalDataSourcesWizardSchema = () => {
+ const ExternalDataSourcesWizardRetrieveQueryParams = orvalSchemas.ExternalDataSourcesWizardRetrieveQueryParams()
+ return ExternalDataSourcesWizardRetrieveQueryParams.extend({
+ fields: z
+ .array(z.enum(['*.name', '*.caption', '*.docsUrl', '*.featured', '*.unreleasedSource', '*.fields']))
+ .min(1)
+ .optional()
+ .describe(
+ 'Optional subset of response fields to return, each a dot-path from the allowlist. Omit to return all fields. Request only the fields your task needs to keep responses small.'
+ ),
+ })
+}
-const externalDataSourcesWizard = (): ToolBase<typeof ExternalDataSourcesWizardSchema, unknown> => ({
+const externalDataSourcesWizard = (): ToolBase<ReturnType<typeof ExternalDataSourcesWizardSchema>, unknown> => ({
name: 'external-data-sources-wizard',
- schema: ExternalDataSourcesWizardSchema,
- handler: async (context: Context, params: z.infer<typeof ExternalDataSourcesWizardSchema>) => {
+ schema: ExternalDataSourcesWizardSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ExternalDataSourcesWizardSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/web_analytics.ts b/services/mcp/src/tools/generated/web_analytics.ts
index 780d80f1a2ad..210b8d67b666 100644
--- a/services/mcp/src/tools/generated/web_analytics.ts
+++ b/services/mcp/src/tools/generated/web_analytics.ts
@@ -2,28 +2,20 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- HeatmapsEventsRetrieveQueryParams,
- HeatmapsListQueryParams,
- SavedCreateBody,
- SavedListQueryParams,
- SavedPartialUpdateBody,
- SavedPartialUpdateParams,
- SavedRegenerateCreateParams,
- SavedRetrieveParams,
- WebAnalyticsPathCleaningSuggestionsApplyParams,
- WebAnalyticsWeeklyDigestQueryParams,
-} from '@/generated/web_analytics/api'
+import * as orvalSchemas from '@/generated/web_analytics/api'
import { createQueryWrapper } from '@/tools/query-wrapper-factory'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const HeatmapsEventsSchema = HeatmapsEventsRetrieveQueryParams
+const HeatmapsEventsSchema = () => {
+ const HeatmapsEventsRetrieveQueryParams = orvalSchemas.HeatmapsEventsRetrieveQueryParams()
+ return HeatmapsEventsRetrieveQueryParams
+}
-const heatmapsEvents = (): ToolBase<typeof HeatmapsEventsSchema, Schemas.HeatmapEventsResponse> => ({
+const heatmapsEvents = (): ToolBase<ReturnType<typeof HeatmapsEventsSchema>, Schemas.HeatmapEventsResponse> => ({
name: 'heatmaps-events',
- schema: HeatmapsEventsSchema,
- handler: async (context: Context, params: z.infer<typeof HeatmapsEventsSchema>) => {
+ schema: HeatmapsEventsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof HeatmapsEventsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.HeatmapEventsResponse>({
method: 'GET',
@@ -50,12 +42,18 @@ const heatmapsEvents = (): ToolBase<typeof HeatmapsEventsSchema, Schemas.Heatmap
},
})
-const HeatmapsListSchema = HeatmapsListQueryParams
+const HeatmapsListSchema = () => {
+ const HeatmapsListQueryParams = orvalSchemas.HeatmapsListQueryParams()
+ return HeatmapsListQueryParams
+}
-const heatmapsList = (): ToolBase<typeof HeatmapsListSchema, WithPostHogUrl<Schemas.HeatmapsResponse[]>> => ({
+const heatmapsList = (): ToolBase<
+ ReturnType<typeof HeatmapsListSchema>,
+ WithPostHogUrl<Schemas.HeatmapsResponse[]>
+> => ({
name: 'heatmaps-list',
- schema: HeatmapsListSchema,
- handler: async (context: Context, params: z.infer<typeof HeatmapsListSchema>) => {
+ schema: HeatmapsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof HeatmapsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.HeatmapsResponse[]>({
method: 'GET',
@@ -81,12 +79,18 @@ const heatmapsList = (): ToolBase<typeof HeatmapsListSchema, WithPostHogUrl<Sche
},
})
-const HeatmapsSavedCreateSchema = SavedCreateBody
+const HeatmapsSavedCreateSchema = () => {
+ const SavedCreateBody = orvalSchemas.SavedCreateBody()
+ return SavedCreateBody
+}
-const heatmapsSavedCreate = (): ToolBase<typeof HeatmapsSavedCreateSchema, Schemas.HeatmapScreenshotResponse> => ({
+const heatmapsSavedCreate = (): ToolBase<
+ ReturnType<typeof HeatmapsSavedCreateSchema>,
+ Schemas.HeatmapScreenshotResponse
+> => ({
name: 'heatmaps-saved-create',
- schema: HeatmapsSavedCreateSchema,
- handler: async (context: Context, params: z.infer<typeof HeatmapsSavedCreateSchema>) => {
+ schema: HeatmapsSavedCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof HeatmapsSavedCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -116,12 +120,18 @@ const heatmapsSavedCreate = (): ToolBase<typeof HeatmapsSavedCreateSchema, Schem
},
})
-const HeatmapsSavedGetSchema = SavedRetrieveParams.omit({ project_id: true })
+const HeatmapsSavedGetSchema = () => {
+ const SavedRetrieveParams = orvalSchemas.SavedRetrieveParams()
+ return SavedRetrieveParams.omit({ project_id: true })
+}
-const heatmapsSavedGet = (): ToolBase<typeof HeatmapsSavedGetSchema, Schemas.HeatmapScreenshotResponse> => ({
+const heatmapsSavedGet = (): ToolBase<
+ ReturnType<typeof HeatmapsSavedGetSchema>,
+ Schemas.HeatmapScreenshotResponse
+> => ({
name: 'heatmaps-saved-get',
- schema: HeatmapsSavedGetSchema,
- handler: async (context: Context, params: z.infer<typeof HeatmapsSavedGetSchema>) => {
+ schema: HeatmapsSavedGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof HeatmapsSavedGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.HeatmapScreenshotResponse>({
method: 'GET',
@@ -131,15 +141,18 @@ const heatmapsSavedGet = (): ToolBase<typeof HeatmapsSavedGetSchema, Schemas.Hea
},
})
-const HeatmapsSavedListSchema = SavedListQueryParams
+const HeatmapsSavedListSchema = () => {
+ const SavedListQueryParams = orvalSchemas.SavedListQueryParams()
+ return SavedListQueryParams
+}
const heatmapsSavedList = (): ToolBase<
- typeof HeatmapsSavedListSchema,
+ ReturnType<typeof HeatmapsSavedListSchema>,
WithPostHogUrl<Schemas.SavedHeatmapListResponse[]>
> => ({
name: 'heatmaps-saved-list',
- schema: HeatmapsSavedListSchema,
- handler: async (context: Context, params: z.infer<typeof HeatmapsSavedListSchema>) => {
+ schema: HeatmapsSavedListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof HeatmapsSavedListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.SavedHeatmapListResponse[]>({
method: 'GET',
@@ -158,15 +171,18 @@ const heatmapsSavedList = (): ToolBase<
},
})
-const HeatmapsSavedRegenerateSchema = SavedRegenerateCreateParams.omit({ project_id: true })
+const HeatmapsSavedRegenerateSchema = () => {
+ const SavedRegenerateCreateParams = orvalSchemas.SavedRegenerateCreateParams()
+ return SavedRegenerateCreateParams.omit({ project_id: true })
+}
const heatmapsSavedRegenerate = (): ToolBase<
- typeof HeatmapsSavedRegenerateSchema,
+ ReturnType<typeof HeatmapsSavedRegenerateSchema>,
Schemas.HeatmapScreenshotResponse
> => ({
name: 'heatmaps-saved-regenerate',
- schema: HeatmapsSavedRegenerateSchema,
- handler: async (context: Context, params: z.infer<typeof HeatmapsSavedRegenerateSchema>) => {
+ schema: HeatmapsSavedRegenerateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof HeatmapsSavedRegenerateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.HeatmapScreenshotResponse>({
method: 'POST',
@@ -176,14 +192,19 @@ const heatmapsSavedRegenerate = (): ToolBase<
},
})
-const HeatmapsSavedUpdateSchema = SavedPartialUpdateParams.omit({ project_id: true }).extend(
- SavedPartialUpdateBody.shape
-)
+const HeatmapsSavedUpdateSchema = () => {
+ const SavedPartialUpdateBody = orvalSchemas.SavedPartialUpdateBody()
+ const SavedPartialUpdateParams = orvalSchemas.SavedPartialUpdateParams()
+ return SavedPartialUpdateParams.omit({ project_id: true }).extend(SavedPartialUpdateBody.shape)
+}
-const heatmapsSavedUpdate = (): ToolBase<typeof HeatmapsSavedUpdateSchema, Schemas.HeatmapScreenshotResponse> => ({
+const heatmapsSavedUpdate = (): ToolBase<
+ ReturnType<typeof HeatmapsSavedUpdateSchema>,
+ Schemas.HeatmapScreenshotResponse
+> => ({
name: 'heatmaps-saved-update',
- schema: HeatmapsSavedUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof HeatmapsSavedUpdateSchema>) => {
+ schema: HeatmapsSavedUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof HeatmapsSavedUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -216,17 +237,21 @@ const heatmapsSavedUpdate = (): ToolBase<typeof HeatmapsSavedUpdateSchema, Schem
},
})
-const WebAnalyticsPathCleaningSuggestionsApplySchema = WebAnalyticsPathCleaningSuggestionsApplyParams.omit({
- project_id: true,
-})
+const WebAnalyticsPathCleaningSuggestionsApplySchema = () => {
+ const WebAnalyticsPathCleaningSuggestionsApplyParams = orvalSchemas.WebAnalyticsPathCleaningSuggestionsApplyParams()
+ return WebAnalyticsPathCleaningSuggestionsApplyParams.omit({ project_id: true })
+}
const webAnalyticsPathCleaningSuggestionsApply = (): ToolBase<
- typeof WebAnalyticsPathCleaningSuggestionsApplySchema,
+ ReturnType<typeof WebAnalyticsPathCleaningSuggestionsApplySchema>,
Schemas.ApplyPathCleaningSuggestionResponse
> => ({
name: 'web-analytics-path-cleaning-suggestions-apply',
- schema: WebAnalyticsPathCleaningSuggestionsApplySchema,
- handler: async (context: Context, params: z.infer<typeof WebAnalyticsPathCleaningSuggestionsApplySchema>) => {
+ schema: WebAnalyticsPathCleaningSuggestionsApplySchema(),
+ handler: async (
+ context: Context,
+ params: z.infer<ReturnType<typeof WebAnalyticsPathCleaningSuggestionsApplySchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.ApplyPathCleaningSuggestionResponse>({
method: 'POST',
@@ -236,16 +261,18 @@ const webAnalyticsPathCleaningSuggestionsApply = (): ToolBase<
},
})
-const WebAnalyticsPathCleaningSuggestionsGenerateSchema = z.object({})
+const WebAnalyticsPathCleaningSuggestionsGenerateSchema = () => z.object({})
const webAnalyticsPathCleaningSuggestionsGenerate = (): ToolBase<
- typeof WebAnalyticsPathCleaningSuggestionsGenerateSchema,
+ ReturnType<typeof WebAnalyticsPathCleaningSuggestionsGenerateSchema>,
Schemas.GeneratePathCleaningSuggestionResponse
> => ({
name: 'web-analytics-path-cleaning-suggestions-generate',
- schema: WebAnalyticsPathCleaningSuggestionsGenerateSchema,
- // eslint-disable-next-line no-unused-vars
- handler: async (context: Context, params: z.infer<typeof WebAnalyticsPathCleaningSuggestionsGenerateSchema>) => {
+ schema: WebAnalyticsPathCleaningSuggestionsGenerateSchema(),
+ handler: async (
+ context: Context,
+ _params: z.infer<ReturnType<typeof WebAnalyticsPathCleaningSuggestionsGenerateSchema>>
+ ) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.GeneratePathCleaningSuggestionResponse>({
method: 'POST',
@@ -255,12 +282,18 @@ const webAnalyticsPathCleaningSuggestionsGenerate = (): ToolBase<
},
})
-const WebAnalyticsWeeklyDigestSchema = WebAnalyticsWeeklyDigestQueryParams
+const WebAnalyticsWeeklyDigestSchema = () => {
+ const WebAnalyticsWeeklyDigestQueryParams = orvalSchemas.WebAnalyticsWeeklyDigestQueryParams()
+ return WebAnalyticsWeeklyDigestQueryParams
+}
-const webAnalyticsWeeklyDigest = (): ToolBase<typeof WebAnalyticsWeeklyDigestSchema, Schemas.WeeklyDigestResponse> => ({
+const webAnalyticsWeeklyDigest = (): ToolBase<
+ ReturnType<typeof WebAnalyticsWeeklyDigestSchema>,
+ Schemas.WeeklyDigestResponse
+> => ({
name: 'web-analytics-weekly-digest',
- schema: WebAnalyticsWeeklyDigestSchema,
- handler: async (context: Context, params: z.infer<typeof WebAnalyticsWeeklyDigestSchema>) => {
+ schema: WebAnalyticsWeeklyDigestSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WebAnalyticsWeeklyDigestSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.WeeklyDigestResponse>({
method: 'GET',
diff --git a/services/mcp/src/tools/generated/workflows.ts b/services/mcp/src/tools/generated/workflows.ts
index a4fe3f7a97e5..a54deace5225 100644
--- a/services/mcp/src/tools/generated/workflows.ts
+++ b/services/mcp/src/tools/generated/workflows.ts
@@ -2,46 +2,22 @@
import { z } from 'zod'
import type { Schemas } from '@/api/generated'
-import {
- HogFlowsBatchJobsListParams,
- HogFlowsCreateBody,
- HogFlowsDiscardDraftCreateParams,
- HogFlowsInvocationResultRetrieveParams,
- HogFlowsInvocationResultsRetrieveParams,
- HogFlowsInvocationResultsRetrieveQueryParams,
- HogFlowsInvocationsCreateBody,
- HogFlowsInvocationsCreateParams,
- HogFlowsListQueryParams,
- HogFlowsLogsRetrieveParams,
- HogFlowsLogsRetrieveQueryParams,
- HogFlowsMetricsGlobalRetrieveQueryParams,
- HogFlowsMetricsRetrieveParams,
- HogFlowsMetricsRetrieveQueryParams,
- HogFlowsPartialUpdateBody,
- HogFlowsPartialUpdateParams,
- HogFlowsPublishCreateBody,
- HogFlowsPublishCreateParams,
- HogFlowsRetrieveParams,
- HogFlowsRevisionsListParams,
- HogFlowsRevisionsListQueryParams,
- HogFlowsRevisionsRestoreCreateBody,
- HogFlowsRevisionsRestoreCreateParams,
- HogFlowsRevisionsRetrieveParams,
- HogFlowsSchedulesPartialUpdateBody,
- HogFlowsSchedulesPartialUpdateParams,
-} from '@/generated/workflows/api'
+import * as orvalSchemas from '@/generated/workflows/api'
import { withUiApp } from '@/resources/ui-apps'
import { WorkflowActionEmailPatchSchema, WorkflowGraphPatchSchema } from '@/schema/tool-inputs'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
-const WorkflowsCreateSchema = HogFlowsCreateBody
+const WorkflowsCreateSchema = () => {
+ const HogFlowsCreateBody = orvalSchemas.HogFlowsCreateBody()
+ return HogFlowsCreateBody
+}
-const workflowsCreate = (): ToolBase<typeof WorkflowsCreateSchema, WithPostHogUrl<Schemas.HogFlow>> =>
+const workflowsCreate = (): ToolBase<ReturnType<typeof WorkflowsCreateSchema>, WithPostHogUrl<Schemas.HogFlow>> =>
withUiApp('workflow', {
name: 'workflows-create',
- schema: WorkflowsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsCreateSchema>) => {
+ schema: WorkflowsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -86,13 +62,16 @@ const workflowsCreate = (): ToolBase<typeof WorkflowsCreateSchema, WithPostHogUr
},
})
-const WorkflowsDiscardDraftSchema = HogFlowsDiscardDraftCreateParams.omit({ project_id: true })
+const WorkflowsDiscardDraftSchema = () => {
+ const HogFlowsDiscardDraftCreateParams = orvalSchemas.HogFlowsDiscardDraftCreateParams()
+ return HogFlowsDiscardDraftCreateParams.omit({ project_id: true })
+}
-const workflowsDiscardDraft = (): ToolBase<typeof WorkflowsDiscardDraftSchema, Schemas.HogFlow> =>
+const workflowsDiscardDraft = (): ToolBase<ReturnType<typeof WorkflowsDiscardDraftSchema>, Schemas.HogFlow> =>
withUiApp('workflow', {
name: 'workflows-discard-draft',
- schema: WorkflowsDiscardDraftSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsDiscardDraftSchema>) => {
+ schema: WorkflowsDiscardDraftSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsDiscardDraftSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.HogFlow>({
method: 'POST',
@@ -102,13 +81,16 @@ const workflowsDiscardDraft = (): ToolBase<typeof WorkflowsDiscardDraftSchema, S
},
})
-const WorkflowsGetSchema = HogFlowsRetrieveParams.omit({ project_id: true })
+const WorkflowsGetSchema = () => {
+ const HogFlowsRetrieveParams = orvalSchemas.HogFlowsRetrieveParams()
+ return HogFlowsRetrieveParams.omit({ project_id: true })
+}
-const workflowsGet = (): ToolBase<typeof WorkflowsGetSchema, WithPostHogUrl<Schemas.HogFlow>> =>
+const workflowsGet = (): ToolBase<ReturnType<typeof WorkflowsGetSchema>, WithPostHogUrl<Schemas.HogFlow>> =>
withUiApp('workflow', {
name: 'workflows-get',
- schema: WorkflowsGetSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsGetSchema>) => {
+ schema: WorkflowsGetSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsGetSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.HogFlow>({
method: 'GET',
@@ -118,15 +100,18 @@ const workflowsGet = (): ToolBase<typeof WorkflowsGetSchema, WithPostHogUrl<Sche
},
})
-const WorkflowsGetInvocationSchema = HogFlowsInvocationResultRetrieveParams.omit({ project_id: true })
+const WorkflowsGetInvocationSchema = () => {
+ const HogFlowsInvocationResultRetrieveParams = orvalSchemas.HogFlowsInvocationResultRetrieveParams()
+ return HogFlowsInvocationResultRetrieveParams.omit({ project_id: true })
+}
const workflowsGetInvocation = (): ToolBase<
- typeof WorkflowsGetInvocationSchema,
+ ReturnType<typeof WorkflowsGetInvocationSchema>,
Schemas.HogInvocationResultDetail
> => ({
name: 'workflows-get-invocation',
- schema: WorkflowsGetInvocationSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsGetInvocationSchema>) => {
+ schema: WorkflowsGetInvocationSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsGetInvocationSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.HogInvocationResultDetail>({
method: 'GET',
@@ -136,12 +121,15 @@ const workflowsGetInvocation = (): ToolBase<
},
})
-const WorkflowsGetRevisionSchema = HogFlowsRevisionsRetrieveParams.omit({ project_id: true })
+const WorkflowsGetRevisionSchema = () => {
+ const HogFlowsRevisionsRetrieveParams = orvalSchemas.HogFlowsRevisionsRetrieveParams()
+ return HogFlowsRevisionsRetrieveParams.omit({ project_id: true })
+}
-const workflowsGetRevision = (): ToolBase<typeof WorkflowsGetRevisionSchema, Schemas.HogFlowRevision> => ({
+const workflowsGetRevision = (): ToolBase<ReturnType<typeof WorkflowsGetRevisionSchema>, Schemas.HogFlowRevision> => ({
name: 'workflows-get-revision',
- schema: WorkflowsGetRevisionSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsGetRevisionSchema>) => {
+ schema: WorkflowsGetRevisionSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsGetRevisionSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.HogFlowRevision>({
method: 'GET',
@@ -151,15 +139,18 @@ const workflowsGetRevision = (): ToolBase<typeof WorkflowsGetRevisionSchema, Sch
},
})
-const WorkflowsGlobalStatsSchema = HogFlowsMetricsGlobalRetrieveQueryParams
+const WorkflowsGlobalStatsSchema = () => {
+ const HogFlowsMetricsGlobalRetrieveQueryParams = orvalSchemas.HogFlowsMetricsGlobalRetrieveQueryParams()
+ return HogFlowsMetricsGlobalRetrieveQueryParams
+}
const workflowsGlobalStats = (): ToolBase<
- typeof WorkflowsGlobalStatsSchema,
+ ReturnType<typeof WorkflowsGlobalStatsSchema>,
WithPostHogUrl<Schemas.WorkflowStatsRow[]>
> => ({
name: 'workflows-global-stats',
- schema: WorkflowsGlobalStatsSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsGlobalStatsSchema>) => {
+ schema: WorkflowsGlobalStatsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsGlobalStatsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.WorkflowStatsRow[]>({
method: 'GET',
@@ -173,13 +164,19 @@ const workflowsGlobalStats = (): ToolBase<
},
})
-const WorkflowsListSchema = HogFlowsListQueryParams
+const WorkflowsListSchema = () => {
+ const HogFlowsListQueryParams = orvalSchemas.HogFlowsListQueryParams()
+ return HogFlowsListQueryParams
+}
-const workflowsList = (): ToolBase<typeof WorkflowsListSchema, WithPostHogUrl<Schemas.PaginatedHogFlowMinimalList>> =>
+const workflowsList = (): ToolBase<
+ ReturnType<typeof WorkflowsListSchema>,
+ WithPostHogUrl<Schemas.PaginatedHogFlowMinimalList>
+> =>
withUiApp('workflow-list', {
name: 'workflows-list',
- schema: WorkflowsListSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsListSchema>) => {
+ schema: WorkflowsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedHogFlowMinimalList>({
method: 'GET',
@@ -202,15 +199,18 @@ const workflowsList = (): ToolBase<typeof WorkflowsListSchema, WithPostHogUrl<Sc
},
})
-const WorkflowsListBatchJobsSchema = HogFlowsBatchJobsListParams.omit({ project_id: true })
+const WorkflowsListBatchJobsSchema = () => {
+ const HogFlowsBatchJobsListParams = orvalSchemas.HogFlowsBatchJobsListParams()
+ return HogFlowsBatchJobsListParams.omit({ project_id: true })
+}
const workflowsListBatchJobs = (): ToolBase<
- typeof WorkflowsListBatchJobsSchema,
+ ReturnType<typeof WorkflowsListBatchJobsSchema>,
WithPostHogUrl<Schemas.HogFlowBatchJob[]>
> => ({
name: 'workflows-list-batch-jobs',
- schema: WorkflowsListBatchJobsSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsListBatchJobsSchema>) => {
+ schema: WorkflowsListBatchJobsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsListBatchJobsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.HogFlowBatchJob[]>({
method: 'GET',
@@ -220,17 +220,21 @@ const workflowsListBatchJobs = (): ToolBase<
},
})
-const WorkflowsListInvocationsSchema = HogFlowsInvocationResultsRetrieveParams.omit({ project_id: true }).extend(
- HogFlowsInvocationResultsRetrieveQueryParams.shape
-)
+const WorkflowsListInvocationsSchema = () => {
+ const HogFlowsInvocationResultsRetrieveParams = orvalSchemas.HogFlowsInvocationResultsRetrieveParams()
+ const HogFlowsInvocationResultsRetrieveQueryParams = orvalSchemas.HogFlowsInvocationResultsRetrieveQueryParams()
+ return HogFlowsInvocationResultsRetrieveParams.omit({ project_id: true }).extend(
+ HogFlowsInvocationResultsRetrieveQueryParams.shape
+ )
+}
const workflowsListInvocations = (): ToolBase<
- typeof WorkflowsListInvocationsSchema,
+ ReturnType<typeof WorkflowsListInvocationsSchema>,
WithPostHogUrl<Schemas.HogInvocationResult[]>
> => ({
name: 'workflows-list-invocations',
- schema: WorkflowsListInvocationsSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsListInvocationsSchema>) => {
+ schema: WorkflowsListInvocationsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsListInvocationsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.HogInvocationResult[]>({
method: 'GET',
@@ -248,17 +252,19 @@ const workflowsListInvocations = (): ToolBase<
},
})
-const WorkflowsListRevisionsSchema = HogFlowsRevisionsListParams.omit({ project_id: true }).extend(
- HogFlowsRevisionsListQueryParams.shape
-)
+const WorkflowsListRevisionsSchema = () => {
+ const HogFlowsRevisionsListParams = orvalSchemas.HogFlowsRevisionsListParams()
+ const HogFlowsRevisionsListQueryParams = orvalSchemas.HogFlowsRevisionsListQueryParams()
+ return HogFlowsRevisionsListParams.omit({ project_id: true }).extend(HogFlowsRevisionsListQueryParams.shape)
+}
const workflowsListRevisions = (): ToolBase<
- typeof WorkflowsListRevisionsSchema,
+ ReturnType<typeof WorkflowsListRevisionsSchema>,
WithPostHogUrl<Schemas.PaginatedHogFlowRevisionBasicList>
> => ({
name: 'workflows-list-revisions',
- schema: WorkflowsListRevisionsSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsListRevisionsSchema>) => {
+ schema: WorkflowsListRevisionsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsListRevisionsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.PaginatedHogFlowRevisionBasicList>({
method: 'GET',
@@ -272,14 +278,16 @@ const workflowsListRevisions = (): ToolBase<
},
})
-const WorkflowsLogsSchema = HogFlowsLogsRetrieveParams.omit({ project_id: true }).extend(
- HogFlowsLogsRetrieveQueryParams.shape
-)
+const WorkflowsLogsSchema = () => {
+ const HogFlowsLogsRetrieveParams = orvalSchemas.HogFlowsLogsRetrieveParams()
+ const HogFlowsLogsRetrieveQueryParams = orvalSchemas.HogFlowsLogsRetrieveQueryParams()
+ return HogFlowsLogsRetrieveParams.omit({ project_id: true }).extend(HogFlowsLogsRetrieveQueryParams.shape)
+}
-const workflowsLogs = (): ToolBase<typeof WorkflowsLogsSchema, unknown> => ({
+const workflowsLogs = (): ToolBase<ReturnType<typeof WorkflowsLogsSchema>, unknown> => ({
name: 'workflows-logs',
- schema: WorkflowsLogsSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsLogsSchema>) => {
+ schema: WorkflowsLogsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsLogsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<unknown>({
method: 'GET',
@@ -297,14 +305,17 @@ const workflowsLogs = (): ToolBase<typeof WorkflowsLogsSchema, unknown> => ({
},
})
-const WorkflowsPatchActionEmailSchema = WorkflowActionEmailPatchSchema
+const WorkflowsPatchActionEmailSchema = () => WorkflowActionEmailPatchSchema
-const workflowsPatchActionEmail = (): ToolBase<typeof WorkflowsPatchActionEmailSchema, Schemas.HogFlow> => ({
+const workflowsPatchActionEmail = (): ToolBase<
+ ReturnType<typeof WorkflowsPatchActionEmailSchema>,
+ Schemas.HogFlow
+> => ({
name: 'workflows-patch-action-email',
- schema: WorkflowsPatchActionEmailSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsPatchActionEmailSchema>) => {
+ schema: WorkflowsPatchActionEmailSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsPatchActionEmailSchema>>) => {
const projectId = await context.stateManager.getProjectId()
- const parsedParams = WorkflowsPatchActionEmailSchema.parse(params)
+ const parsedParams = WorkflowsPatchActionEmailSchema().parse(params)
const { id, action_id, ...body } = parsedParams
const result = await context.api.request<Schemas.HogFlow>({
method: 'PATCH',
@@ -315,14 +326,14 @@ const workflowsPatchActionEmail = (): ToolBase<typeof WorkflowsPatchActionEmailS
},
})
-const WorkflowsPatchGraphSchema = WorkflowGraphPatchSchema
+const WorkflowsPatchGraphSchema = () => WorkflowGraphPatchSchema
-const workflowsPatchGraph = (): ToolBase<typeof WorkflowsPatchGraphSchema, Schemas.HogFlow> => ({
+const workflowsPatchGraph = (): ToolBase<ReturnType<typeof WorkflowsPatchGraphSchema>, Schemas.HogFlow> => ({
name: 'workflows-patch-graph',
- schema: WorkflowsPatchGraphSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsPatchGraphSchema>) => {
+ schema: WorkflowsPatchGraphSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsPatchGraphSchema>>) => {
const projectId = await context.stateManager.getProjectId()
- const parsedParams = WorkflowsPatchGraphSchema.parse(params)
+ const parsedParams = WorkflowsPatchGraphSchema().parse(params)
const { id, ...body } = parsedParams
const result = await context.api.request<Schemas.HogFlow>({
method: 'PATCH',
@@ -333,14 +344,16 @@ const workflowsPatchGraph = (): ToolBase<typeof WorkflowsPatchGraphSchema, Schem
},
})
-const WorkflowsPublishSchema = HogFlowsPublishCreateParams.omit({ project_id: true }).extend(
- HogFlowsPublishCreateBody.shape
-)
+const WorkflowsPublishSchema = () => {
+ const HogFlowsPublishCreateBody = orvalSchemas.HogFlowsPublishCreateBody()
+ const HogFlowsPublishCreateParams = orvalSchemas.HogFlowsPublishCreateParams()
+ return HogFlowsPublishCreateParams.omit({ project_id: true }).extend(HogFlowsPublishCreateBody.shape)
+}
-const workflowsPublish = (): ToolBase<typeof WorkflowsPublishSchema, Schemas.HogFlowPublishResponse> => ({
+const workflowsPublish = (): ToolBase<ReturnType<typeof WorkflowsPublishSchema>, Schemas.HogFlowPublishResponse> => ({
name: 'workflows-publish',
- schema: WorkflowsPublishSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsPublishSchema>) => {
+ schema: WorkflowsPublishSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsPublishSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.confirm !== undefined) {
@@ -358,14 +371,18 @@ const workflowsPublish = (): ToolBase<typeof WorkflowsPublishSchema, Schemas.Hog
},
})
-const WorkflowsRestoreRevisionSchema = HogFlowsRevisionsRestoreCreateParams.omit({ project_id: true }).extend(
- HogFlowsRevisionsRestoreCreateBody.shape
-)
+const WorkflowsRestoreRevisionSchema = () => {
+ const HogFlowsRevisionsRestoreCreateBody = orvalSchemas.HogFlowsRevisionsRestoreCreateBody()
+ const HogFlowsRevisionsRestoreCreateParams = orvalSchemas.HogFlowsRevisionsRestoreCreateParams()
+ return HogFlowsRevisionsRestoreCreateParams.omit({ project_id: true }).extend(
+ HogFlowsRevisionsRestoreCreateBody.shape
+ )
+}
-const workflowsRestoreRevision = (): ToolBase<typeof WorkflowsRestoreRevisionSchema, Schemas.HogFlow> => ({
+const workflowsRestoreRevision = (): ToolBase<ReturnType<typeof WorkflowsRestoreRevisionSchema>, Schemas.HogFlow> => ({
name: 'workflows-restore-revision',
- schema: WorkflowsRestoreRevisionSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsRestoreRevisionSchema>) => {
+ schema: WorkflowsRestoreRevisionSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsRestoreRevisionSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.overwrite !== undefined) {
@@ -383,14 +400,16 @@ const workflowsRestoreRevision = (): ToolBase<typeof WorkflowsRestoreRevisionSch
},
})
-const WorkflowsStatsSchema = HogFlowsMetricsRetrieveParams.omit({ project_id: true }).extend(
- HogFlowsMetricsRetrieveQueryParams.shape
-)
+const WorkflowsStatsSchema = () => {
+ const HogFlowsMetricsRetrieveParams = orvalSchemas.HogFlowsMetricsRetrieveParams()
+ const HogFlowsMetricsRetrieveQueryParams = orvalSchemas.HogFlowsMetricsRetrieveQueryParams()
+ return HogFlowsMetricsRetrieveParams.omit({ project_id: true }).extend(HogFlowsMetricsRetrieveQueryParams.shape)
+}
-const workflowsStats = (): ToolBase<typeof WorkflowsStatsSchema, Schemas.AppMetricsResponse> => ({
+const workflowsStats = (): ToolBase<ReturnType<typeof WorkflowsStatsSchema>, Schemas.AppMetricsResponse> => ({
name: 'workflows-stats',
- schema: WorkflowsStatsSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsStatsSchema>) => {
+ schema: WorkflowsStatsSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsStatsSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const result = await context.api.request<Schemas.AppMetricsResponse>({
method: 'GET',
@@ -409,14 +428,16 @@ const workflowsStats = (): ToolBase<typeof WorkflowsStatsSchema, Schemas.AppMetr
},
})
-const WorkflowsTestRunSchema = HogFlowsInvocationsCreateParams.omit({ project_id: true }).extend(
- HogFlowsInvocationsCreateBody.shape
-)
+const WorkflowsTestRunSchema = () => {
+ const HogFlowsInvocationsCreateBody = orvalSchemas.HogFlowsInvocationsCreateBody()
+ const HogFlowsInvocationsCreateParams = orvalSchemas.HogFlowsInvocationsCreateParams()
+ return HogFlowsInvocationsCreateParams.omit({ project_id: true }).extend(HogFlowsInvocationsCreateBody.shape)
+}
-const workflowsTestRun = (): ToolBase<typeof WorkflowsTestRunSchema, unknown> => ({
+const workflowsTestRun = (): ToolBase<ReturnType<typeof WorkflowsTestRunSchema>, unknown> => ({
name: 'workflows-test-run',
- schema: WorkflowsTestRunSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsTestRunSchema>) => {
+ schema: WorkflowsTestRunSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsTestRunSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.globals !== undefined) {
@@ -440,15 +461,17 @@ const workflowsTestRun = (): ToolBase<typeof WorkflowsTestRunSchema, unknown> =>
},
})
-const WorkflowsUpdateSchema = HogFlowsPartialUpdateParams.omit({ project_id: true }).extend(
- HogFlowsPartialUpdateBody.shape
-)
+const WorkflowsUpdateSchema = () => {
+ const HogFlowsPartialUpdateBody = orvalSchemas.HogFlowsPartialUpdateBody()
+ const HogFlowsPartialUpdateParams = orvalSchemas.HogFlowsPartialUpdateParams()
+ return HogFlowsPartialUpdateParams.omit({ project_id: true }).extend(HogFlowsPartialUpdateBody.shape)
+}
-const workflowsUpdate = (): ToolBase<typeof WorkflowsUpdateSchema, WithPostHogUrl<Schemas.HogFlowUpdate>> =>
+const workflowsUpdate = (): ToolBase<ReturnType<typeof WorkflowsUpdateSchema>, WithPostHogUrl<Schemas.HogFlowUpdate>> =>
withUiApp('workflow', {
name: 'workflows-update',
- schema: WorkflowsUpdateSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsUpdateSchema>) => {
+ schema: WorkflowsUpdateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsUpdateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.name !== undefined) {
@@ -481,14 +504,21 @@ const workflowsUpdate = (): ToolBase<typeof WorkflowsUpdateSchema, WithPostHogUr
},
})
-const WorkflowsUpdateScheduleSchema = HogFlowsSchedulesPartialUpdateParams.omit({ project_id: true }).extend(
- HogFlowsSchedulesPartialUpdateBody.shape
-)
+const WorkflowsUpdateScheduleSchema = () => {
+ const HogFlowsSchedulesPartialUpdateBody = orvalSchemas.HogFlowsSchedulesPartialUpdateBody()
+ const HogFlowsSchedulesPartialUpdateParams = orvalSchemas.HogFlowsSchedulesPartialUpdateParams()
+ return HogFlowsSchedulesPartialUpdateParams.omit({ project_id: true }).extend(
+ HogFlowsSchedulesPartialUpdateBody.shape
+ )
+}
-const workflowsUpdateSchedule = (): ToolBase<typeof WorkflowsUpdateScheduleSchema, Schemas.HogFlowSchedule> => ({
+const workflowsUpdateSchedule = (): ToolBase<
+ ReturnType<typeof WorkflowsUpdateScheduleSchema>,
+ Schemas.HogFlowSchedule
+> => ({
name: 'workflows-update-schedule',
- schema: WorkflowsUpdateScheduleSchema,
- handler: async (context: Context, params: z.infer<typeof WorkflowsUpdateScheduleSchema>) => {
+ schema: WorkflowsUpdateScheduleSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof WorkflowsUpdateScheduleSchema>>) => {
const projectId = await context.stateManager.getProjectId()
const body: Record<string, unknown> = {}
if (params.rrule !== undefined) {
diff --git a/services/mcp/src/tools/loops/loopsReview.ts b/services/mcp/src/tools/loops/loopsReview.ts
index 477240fba39e..8ef40c57ccda 100644
--- a/services/mcp/src/tools/loops/loopsReview.ts
+++ b/services/mcp/src/tools/loops/loopsReview.ts
@@ -7,7 +7,7 @@ import type { Context, ToolBase } from '@/tools/types'
// The review card's input is exactly the `loops-create` body, so the card's "Create loop"
// button can forward the reviewed config unchanged. This tool doesn't write anything — it
// echoes the config back so the UI app can render it for confirmation.
-const schema = LoopsCreateBody
+const schema = LoopsCreateBody()
type Params = z.infer<typeof schema>
diff --git a/services/mcp/src/tools/workflows/lifecycle.ts b/services/mcp/src/tools/workflows/lifecycle.ts
index 0503f17911fa..fba6342a36a9 100644
--- a/services/mcp/src/tools/workflows/lifecycle.ts
+++ b/services/mcp/src/tools/workflows/lifecycle.ts
@@ -6,7 +6,7 @@ import { withUiApp } from '@/resources/ui-apps'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase } from '@/tools/types'
-const LifecycleSchema = HogFlowsPartialUpdateParams.omit({ project_id: true })
+const LifecycleSchema = HogFlowsPartialUpdateParams().omit({ project_id: true })
type LifecycleParams = z.infer<typeof LifecycleSchema>
type LifecycleResult = WithPostHogUrl<Schemas.HogFlow>
diff --git a/services/mcp/tests/hono/tool-executor-metrics.test.ts b/services/mcp/tests/hono/tool-executor-metrics.test.ts
index 8fb0f090062c..800bfc2e8097 100644
--- a/services/mcp/tests/hono/tool-executor-metrics.test.ts
+++ b/services/mcp/tests/hono/tool-executor-metrics.test.ts
@@ -51,6 +51,8 @@ import {
wrapError,
} from '@/lib/errors'
+import { toolFromPreBuilt } from '../shared/test-utils'
+
const mockTrackToolCall = vi.mocked(trackToolCall)
/** Extra-properties bag passed to the 5th arg of `trackToolCall` for a given tool. */
@@ -110,15 +112,17 @@ function makeState(tools: { name: string }[], overrides: Partial<ResolvedState>
}
}
+type FakeToolBase = { schema: z.ZodObject<Record<string, never>>; handler: ReturnType<typeof vi.fn>; _meta: undefined }
+
function makeFakeTool(
name: string,
handler: () => Promise<unknown> = async () => 'ok'
-): {
- name: string
- base: { schema: z.ZodObject<Record<string, never>>; handler: ReturnType<typeof vi.fn>; _meta: undefined }
-} {
+): { name: string; build: () => FakeToolBase; base: FakeToolBase } {
return {
name,
+ build() {
+ return this.base
+ },
base: {
schema: z.object({}),
handler: vi.fn().mockImplementation(handler),
@@ -405,6 +409,9 @@ describe('ToolExecutor metrics', () => {
it('records validation_error without starting a timer', async () => {
vi.spyOn(catalog, 'getToolByName').mockReturnValue({
name: 'strict-tool',
+ build() {
+ return this.base
+ },
base: { schema: z.object({ required_field: z.string() }), handler: vi.fn(), _meta: undefined },
} as any)
@@ -421,6 +428,9 @@ describe('ToolExecutor metrics', () => {
it('emits an errored analytics event with the rejected fields on a schema rejection', async () => {
vi.spyOn(catalog, 'getToolByName').mockReturnValue({
name: 'strict-tool',
+ build() {
+ return this.base
+ },
base: { schema: z.object({ required_field: z.string() }), handler: vi.fn(), _meta: undefined },
} as any)
@@ -459,16 +469,9 @@ describe('ToolExecutor metrics', () => {
// Mirror getFilteredTools: full tool objects with real schemas and
// handlers, so exec's inner dispatch (schema validation, handler
// call) behaves as in production.
- const tools = catalog.getPreBuiltEntries().map((entry) => {
- const preBuilt = catalog.getToolByName(entry.name)!
- return {
- ...preBuilt.base,
- title: entry.title,
- description: entry.description ?? '',
- annotations: entry.annotations,
- scopes: [],
- }
- })
+ const tools = catalog
+ .getPreBuiltEntries()
+ .map((entry) => toolFromPreBuilt(catalog.getToolByName(entry.name)!, entry))
return makeState(tools as any, { useSingleExec: true })
}
@@ -691,16 +694,9 @@ describe('ToolExecutor metrics', () => {
})
it('records the skill in direct tools mode too', async () => {
- const tools = catalog.getPreBuiltEntries().map((entry) => {
- const preBuilt = catalog.getToolByName(entry.name)!
- return {
- ...preBuilt.base,
- title: entry.title,
- description: entry.description ?? '',
- annotations: entry.annotations,
- scopes: [],
- }
- })
+ const tools = catalog
+ .getPreBuiltEntries()
+ .map((entry) => toolFromPreBuilt(catalog.getToolByName(entry.name)!, entry))
await executor.handleToolCall(
{ name: 'skill-get', arguments: { skill_name: 'conductor' } },
diff --git a/services/mcp/tests/hono/tool-executor-tokens.test.ts b/services/mcp/tests/hono/tool-executor-tokens.test.ts
index 8263cb895b62..c0769819291c 100644
--- a/services/mcp/tests/hono/tool-executor-tokens.test.ts
+++ b/services/mcp/tests/hono/tool-executor-tokens.test.ts
@@ -30,6 +30,8 @@ import { ToolCatalog } from '@/hono/tool-catalog'
import { ToolExecutor } from '@/hono/tool-executor'
import { estimateTokens } from '@/lib/estimate-tokens'
+import { toolFromPreBuilt } from '../shared/test-utils'
+
function makeState(tools: { name: string }[], overrides: Partial<ResolvedState> = {}): ResolvedState {
return {
reqCtx: {
@@ -81,20 +83,22 @@ function makeState(tools: { name: string }[], overrides: Partial<ResolvedState>
}
}
+type FakeToolBase = {
+ schema: z.ZodObject<Record<string, never>>
+ handler: ReturnType<typeof vi.fn>
+ _meta?: { ui?: { resourceUri?: string } }
+}
+
function makeFakeTool(
name: string,
handler: () => Promise<unknown> = async () => 'ok',
_meta?: { ui?: { resourceUri?: string } }
-): {
- name: string
- base: {
- schema: z.ZodObject<Record<string, never>>
- handler: ReturnType<typeof vi.fn>
- _meta?: { ui?: { resourceUri?: string } }
- }
-} {
+): { name: string; build: () => FakeToolBase; base: FakeToolBase } {
return {
name,
+ build() {
+ return this.base
+ },
base: {
schema: z.object({}),
handler: vi.fn().mockImplementation(handler),
@@ -123,6 +127,9 @@ describe('ToolExecutor token estimates', () => {
it('emits the execute-sql generation with the validated args', async () => {
vi.spyOn(catalog, 'getToolByName').mockReturnValue({
name: 'execute-sql',
+ build() {
+ return this.base
+ },
base: {
schema: z.object({ query: z.string() }),
handler: vi.fn().mockResolvedValue('ok'),
@@ -237,16 +244,9 @@ describe('ToolExecutor token estimates', () => {
it('attributes the canonical event to the inner tool via the standard $mcp_tool_name', async () => {
// Full catalog tools (real names, so the instructions builder resolves them),
// with the target handler stubbed to keep dispatch offline + deterministic.
- const tools = catalog.getPreBuiltEntries().map((entry) => {
- const preBuilt = catalog.getToolByName(entry.name)!
- return {
- ...preBuilt.base,
- title: entry.title,
- description: entry.description ?? '',
- annotations: entry.annotations,
- scopes: [],
- }
- })
+ const tools = catalog
+ .getPreBuiltEntries()
+ .map((entry) => toolFromPreBuilt(catalog.getToolByName(entry.name)!, entry))
const target = tools.find((t) => t.name === 'docs-search')! as any
target.handler = vi.fn(async () => 'inner-ok')
const state = makeState(tools as any, { useSingleExec: true })
diff --git a/services/mcp/tests/hono/tool-executor.test.ts b/services/mcp/tests/hono/tool-executor.test.ts
index 58805fff51e6..21df17069824 100644
--- a/services/mcp/tests/hono/tool-executor.test.ts
+++ b/services/mcp/tests/hono/tool-executor.test.ts
@@ -370,6 +370,9 @@ describe('ToolExecutor', () => {
},
])('$label', async ({ useSingleExec, renderUiEnabled, expectStructuredContent }) => {
getToolByNameSpy = vi.spyOn(catalog, 'getToolByName').mockReturnValue({
+ build() {
+ return this.base
+ },
base: {
schema: z.object({}),
handler: async () => ({
diff --git a/services/mcp/tests/integration/skill-analytics.integration.test.ts b/services/mcp/tests/integration/skill-analytics.integration.test.ts
index bfce36b15fc8..0658b6a92478 100644
--- a/services/mcp/tests/integration/skill-analytics.integration.test.ts
+++ b/services/mcp/tests/integration/skill-analytics.integration.test.ts
@@ -1,8 +1,9 @@
import http from 'node:http'
import { gunzipSync } from 'node:zlib'
-
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
+import { toolFromPreBuilt } from '../shared/test-utils'
+
/**
* End-to-end proof that a real skill read reaches PostHog carrying the skill's name.
*
@@ -81,16 +82,9 @@ describe.skipIf(!API_TOKEN)('skill read reaches PostHog with $mcp_skill_name', (
await catalog.warmup()
const executor = new ToolExecutor(catalog, new InstructionsBuilder(''))
- const tools = catalog.getPreBuiltEntries().map((entry) => {
- const preBuilt = catalog.getToolByName(entry.name)!
- return {
- ...preBuilt.base,
- title: entry.title,
- description: entry.description ?? '',
- annotations: entry.annotations,
- scopes: [],
- }
- })
+ const tools = catalog
+ .getPreBuiltEntries()
+ .map((entry) => toolFromPreBuilt(catalog.getToolByName(entry.name)!, entry))
const state: any = {
reqCtx: {
diff --git a/services/mcp/tests/shared/test-utils.ts b/services/mcp/tests/shared/test-utils.ts
index 33e77fb32648..aba325ed37e2 100644
--- a/services/mcp/tests/shared/test-utils.ts
+++ b/services/mcp/tests/shared/test-utils.ts
@@ -1,11 +1,14 @@
+import type { Tool as McpTool } from '@modelcontextprotocol/sdk/types.js'
+
import { ApiClient } from '@/api/client'
+import type { PreBuiltTool } from '@/hono/tool-catalog'
import { MemoryCache } from '@/lib/cache/MemoryCache'
import { SessionManager } from '@/lib/SessionManager'
import { StateManager } from '@/lib/StateManager'
import type { InsightQuery } from '@/schema/query'
import { GENERATED_TOOL_MAP } from '@/tools/generated'
import { TOOL_MAP } from '@/tools/index'
-import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
+import type { Context, Tool, ToolBase, ZodObjectAny } from '@/tools/types'
export const API_BASE_URL = process.env.TEST_POSTHOG_API_BASE_URL || 'http://localhost:8010'
export const API_TOKEN = process.env.TEST_POSTHOG_PERSONAL_API_KEY
@@ -620,3 +623,22 @@ export const SAMPLE_PATHS_QUERIES = {
},
},
} as const satisfies Record<SamplePathsQuery, InsightQuery>
+
+/**
+ * Mirrors ToolCatalog.getFilteredTools for one advertised entry. The schema is
+ * built on access, so a list of every tool does not hold 900+ built schemas.
+ */
+export function toolFromPreBuilt(preBuilt: PreBuiltTool, entry: McpTool): Tool<ZodObjectAny> {
+ return {
+ name: entry.name,
+ get schema() {
+ return preBuilt.build().schema
+ },
+ handler: (context, params) => preBuilt.build().handler(context, params),
+ ...(preBuilt.meta ? { _meta: preBuilt.meta } : {}),
+ title: entry.title ?? entry.name,
+ description: entry.description ?? '',
+ annotations: entry.annotations as Tool<ZodObjectAny>['annotations'],
+ scopes: [],
+ }
+}
diff --git a/services/mcp/tests/unit/__snapshots__/generate-tools.test.ts.snap b/services/mcp/tests/unit/__snapshots__/generate-tools.test.ts.snap
index 60935e137f24..cb37e0fa120a 100644
--- a/services/mcp/tests/unit/__snapshots__/generate-tools.test.ts.snap
+++ b/services/mcp/tests/unit/__snapshots__/generate-tools.test.ts.snap
@@ -2,14 +2,14 @@
exports[`generateToolCode with input_schema > applies enrich_url with input_schema 1`] = `
"
-const ThingsCreateSchema = ThingCreateSchema
+const ThingsCreateSchema = () => ThingCreateSchema
-const thingsCreate = (): ToolBase<typeof ThingsCreateSchema, unknown> => ({
+const thingsCreate = (): ToolBase<ReturnType<typeof ThingsCreateSchema>, unknown> => ({
name: 'things-create',
- schema: ThingsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ThingsCreateSchema>) => {
+ schema: ThingsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ThingsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
- const parsedParams = ThingsCreateSchema.parse(params)
+ const parsedParams = ThingsCreateSchema().parse(params)
const result = await context.api.request<unknown>({
method: 'POST',
path: \`/api/projects/\${encodeURIComponent(String(projectId))}/things/\`,
@@ -23,14 +23,14 @@ const thingsCreate = (): ToolBase<typeof ThingsCreateSchema, unknown> => ({
exports[`generateToolCode with input_schema > applies list enrichment with input_schema 1`] = `
"
-const ThingsListSchema = ThingListSchema
+const ThingsListSchema = () => ThingListSchema
-const thingsList = (): ToolBase<typeof ThingsListSchema, unknown> => ({
+const thingsList = (): ToolBase<ReturnType<typeof ThingsListSchema>, unknown> => ({
name: 'things-list',
- schema: ThingsListSchema,
- handler: async (context: Context, params: z.infer<typeof ThingsListSchema>) => {
+ schema: ThingsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ThingsListSchema>>) => {
const projectId = await context.stateManager.getProjectId()
- const parsedParams = ThingsListSchema.parse(params)
+ const parsedParams = ThingsListSchema().parse(params)
const result = await context.api.request<unknown>({
method: 'GET',
path: \`/api/projects/\${encodeURIComponent(String(projectId))}/things/\`,
@@ -47,14 +47,14 @@ const thingsList = (): ToolBase<typeof ThingsListSchema, unknown> => ({
exports[`generateToolCode with input_schema > uses custom schema import when input_schema is set 1`] = `
"
-const ThingsCreateSchema = ThingCreateSchema
+const ThingsCreateSchema = () => ThingCreateSchema
-const thingsCreate = (): ToolBase<typeof ThingsCreateSchema, unknown> => ({
+const thingsCreate = (): ToolBase<ReturnType<typeof ThingsCreateSchema>, unknown> => ({
name: 'things-create',
- schema: ThingsCreateSchema,
- handler: async (context: Context, params: z.infer<typeof ThingsCreateSchema>) => {
+ schema: ThingsCreateSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ThingsCreateSchema>>) => {
const projectId = await context.stateManager.getProjectId()
- const parsedParams = ThingsCreateSchema.parse(params)
+ const parsedParams = ThingsCreateSchema().parse(params)
const result = await context.api.request<unknown>({
method: 'POST',
path: \`/api/projects/\${encodeURIComponent(String(projectId))}/things/\`,
diff --git a/services/mcp/tests/unit/dashboard-update-schema.test.ts b/services/mcp/tests/unit/dashboard-update-schema.test.ts
index fc959d51debc..27ef6de8a4f4 100644
--- a/services/mcp/tests/unit/dashboard-update-schema.test.ts
+++ b/services/mcp/tests/unit/dashboard-update-schema.test.ts
@@ -20,7 +20,7 @@ describe('dashboard-update schema', () => {
it('includes every OpenAPI PATCH body field from DashboardsPartialUpdateBody', () => {
const toolShape = getSchemaShape(tool.schema)
- const openapiBodyKeys = Object.keys(DashboardsPartialUpdateBody.shape)
+ const openapiBodyKeys = Object.keys(DashboardsPartialUpdateBody().shape)
for (const param of openapiBodyKeys) {
expect(toolShape[param], `dashboard-update schema missing OpenAPI field: ${param}`).not.toBeUndefined()
diff --git a/services/mcp/tests/unit/generate-tools.test.ts b/services/mcp/tests/unit/generate-tools.test.ts
index 21c345bc89ba..2a642106ada0 100644
--- a/services/mcp/tests/unit/generate-tools.test.ts
+++ b/services/mcp/tests/unit/generate-tools.test.ts
@@ -214,7 +214,7 @@ describe('generateToolCode with input_schema', () => {
stubGetQuerySchema
)
- expect(result.code).toContain('const parsedParams = ThingsCreateSchema.parse(params)')
+ expect(result.code).toContain('const parsedParams = ThingsCreateSchema().parse(params)')
expect(result.code).toContain('body: parsedParams')
})
@@ -236,7 +236,7 @@ describe('generateToolCode with input_schema', () => {
stubGetQuerySchema
)
- expect(result.code).toContain('const parsedParams = ThingsListSchema.parse(params)')
+ expect(result.code).toContain('const parsedParams = ThingsListSchema().parse(params)')
expect(result.code).toContain('query: parsedParams')
})
@@ -260,7 +260,7 @@ describe('generateToolCode with input_schema', () => {
)
expect(result.code).toContain(
- "const thingsList = (): ToolBase<typeof ThingsListSchema, Omit<Schemas.ThingList, 'results'> & { results: unknown[] }>"
+ "const thingsList = (): ToolBase<ReturnType<typeof ThingsListSchema>, Omit<Schemas.ThingList, 'results'> & { results: unknown[] }>"
)
expect(result.code).toContain(
"const result = await context.api.request<Omit<Schemas.ThingList, 'results'> & { results: unknown[] }>({"
@@ -1116,7 +1116,7 @@ describe('param_overrides aliases', () => {
expect(result.castHelperImports.has('normalizeParamAliases')).toBe(true)
expect(result.code).toContain(
- "const ThingsGetSchema = z.preprocess(normalizeParamAliases({ id: ['thingId', 'thing_id'] }), ThingsRetrieveParams.omit({ project_id: true }))"
+ "const ThingsGetSchema = () => {\n const ThingsRetrieveParams = orvalSchemas.ThingsRetrieveParams()\n return z.preprocess(normalizeParamAliases({ id: ['thingId', 'thing_id'] }), ThingsRetrieveParams.omit({ project_id: true }))\n}"
)
})
})
@@ -1720,7 +1720,9 @@ describe('generateToolCode with informational response wrapping', () => {
stubGetQuerySchema
)
- expect(result.code).toContain('ToolBase<typeof ThingsGetSchema, WithInformationalResponse<unknown>>')
+ expect(result.code).toContain(
+ 'ToolBase<ReturnType<typeof ThingsGetSchema>, WithInformationalResponse<unknown>>'
+ )
const filteringIndex = result.code.indexOf('const filtered =')
const wrappingIndex = result.code.indexOf('withInformationalResponse(')
expect(filteringIndex).toBeGreaterThan(-1)
diff --git a/services/mcp/tests/unit/schema.feature-flag-filters.test.ts b/services/mcp/tests/unit/schema.feature-flag-filters.test.ts
index 6169ad7daa55..b6b9f63af26f 100644
--- a/services/mcp/tests/unit/schema.feature-flag-filters.test.ts
+++ b/services/mcp/tests/unit/schema.feature-flag-filters.test.ts
@@ -5,7 +5,7 @@ import { SurveysCreateBody } from '@/generated/surveys/api'
describe('Feature flag filter schemas', () => {
it('should accept valid feature flag filters from OpenAPI schema', () => {
- const result = FeatureFlagsCreateBody.shape.filters.safeParse({
+ const result = FeatureFlagsCreateBody().shape.filters.safeParse({
groups: [
{
properties: [
@@ -25,13 +25,13 @@ describe('Feature flag filter schemas', () => {
})
it('should reject invalid feature flag filters from OpenAPI schema', () => {
- const result = FeatureFlagsCreateBody.shape.filters.safeParse('not-an-object')
+ const result = FeatureFlagsCreateBody().shape.filters.safeParse('not-an-object')
expect(result.success).toBe(false)
})
it("should reject non-'flag_evaluates_to' operators for flag property filters", () => {
- const result = FeatureFlagsCreateBody.shape.filters.safeParse({
+ const result = FeatureFlagsCreateBody().shape.filters.safeParse({
groups: [
{
properties: [
@@ -50,7 +50,7 @@ describe('Feature flag filter schemas', () => {
})
it('should reject non-string values for semver operators', () => {
- const result = FeatureFlagsCreateBody.shape.filters.safeParse({
+ const result = FeatureFlagsCreateBody().shape.filters.safeParse({
groups: [
{
properties: [
@@ -69,7 +69,7 @@ describe('Feature flag filter schemas', () => {
})
it('should reject non-array values for icontains_multi operators', () => {
- const result = FeatureFlagsCreateBody.shape.filters.safeParse({
+ const result = FeatureFlagsCreateBody().shape.filters.safeParse({
groups: [
{
properties: [
@@ -88,7 +88,7 @@ describe('Feature flag filter schemas', () => {
})
it('should use feature flag filters schema for survey targeting filters', () => {
- const result = SurveysCreateBody.safeParse({
+ const result = SurveysCreateBody().safeParse({
name: 'Survey with targeting filters',
type: 'popover',
questions: [{ type: 'open', question: 'How was your experience?' }],
@@ -113,7 +113,7 @@ describe('Feature flag filter schemas', () => {
})
it('should keep feature flag list search/filter query params valid', () => {
- const result = FeatureFlagsListQueryParams.safeParse({
+ const result = FeatureFlagsListQueryParams().safeParse({
search: 'checkout-flag',
type: 'remote_config',
limit: 10,
@@ -125,7 +125,7 @@ describe('Feature flag filter schemas', () => {
})
describe('Multivariate schema', () => {
- const filtersSchema = FeatureFlagsCreateBody.shape.filters
+ const filtersSchema = FeatureFlagsCreateBody().shape.filters
it('should accept valid multivariate variants', () => {
const result = filtersSchema.safeParse({
@@ -186,7 +186,7 @@ describe('Multivariate schema', () => {
})
describe('Filter groups schema', () => {
- const filtersSchema = FeatureFlagsCreateBody.shape.filters
+ const filtersSchema = FeatureFlagsCreateBody().shape.filters
it('should accept groups with variant override', () => {
const result = filtersSchema.safeParse({
diff --git a/services/mcp/tests/unit/schema.survey-question-id.test.ts b/services/mcp/tests/unit/schema.survey-question-id.test.ts
index 584ea428946e..aca2f01c79df 100644
--- a/services/mcp/tests/unit/schema.survey-question-id.test.ts
+++ b/services/mcp/tests/unit/schema.survey-question-id.test.ts
@@ -8,8 +8,8 @@ import { SurveysCreateBody, SurveysPartialUpdateBody } from '@/generated/surveys
// UUID, orphaning historical responses (support ticket 61130).
describe('Survey question id preservation', () => {
it.each([
- ['survey-create', SurveysCreateBody.shape.questions],
- ['survey-update', SurveysPartialUpdateBody.shape.questions],
+ ['survey-create', SurveysCreateBody().shape.questions],
+ ['survey-update', SurveysPartialUpdateBody().shape.questions],
])('preserves an explicit question id through %s validation', (_label, questionsSchema) => {
const existingId = '0190a1b2-c3d4-7e8f-9012-3456789abcde'
diff --git a/services/mcp/tests/unit/tool-catalog.test.ts b/services/mcp/tests/unit/tool-catalog.test.ts
index c7c38b1bc7ad..633f6b2fa30e 100644
--- a/services/mcp/tests/unit/tool-catalog.test.ts
+++ b/services/mcp/tests/unit/tool-catalog.test.ts
@@ -138,6 +138,14 @@ describe('ToolCatalog', () => {
expect(result.type).toBe('object')
})
+
+ it('returns plain data with no handle back to the zod instance', () => {
+ // zod puts a non-enumerable `~standard` handle on its JSON Schema output. Kept on a
+ // catalog entry, it would pin every built schema for the life of the process.
+ const result = toMcpInputSchema(z.object({ a: z.string() }))
+
+ expect('~standard' in result).toBe(false)
+ })
})
describe('warmup', () => {
@@ -152,6 +160,14 @@ describe('ToolCatalog', () => {
await catalog.warmup()
expect(catalog.warmedUp).toBe(true)
})
+
+ it('builds a fresh tool on every lookup instead of keeping one', async () => {
+ await catalog.warmup()
+
+ const preBuilt = catalog.getToolByName('gen-tool-c')!
+
+ expect(preBuilt.build().schema).not.toBe(preBuilt.build().schema)
+ })
})
describe('getFilteredTools', () => {
diff --git a/services/mcp/tests/unit/workflows-config-schema.test.ts b/services/mcp/tests/unit/workflows-config-schema.test.ts
index 34d1b87fc8a3..025cfa47a747 100644
--- a/services/mcp/tests/unit/workflows-config-schema.test.ts
+++ b/services/mcp/tests/unit/workflows-config-schema.test.ts
@@ -34,7 +34,7 @@ describe('workflows create schema — action config', () => {
// the typed branch never strips.
some_future_key: 'must survive',
}
- const result = HogFlowsCreateBody.safeParse({
+ const result = HogFlowsCreateBody().safeParse({
name: 'Wait until workflow',
actions: [
triggerAction,
@@ -60,7 +60,7 @@ describe('workflows create schema — action config', () => {
],
max_wait_duration: '1h',
}
- const result = HogFlowsCreateBody.safeParse({
+ const result = HogFlowsCreateBody().safeParse({
name: 'Events-only wait workflow',
actions: [
triggerAction,
@@ -85,7 +85,7 @@ describe('workflows create schema — action config', () => {
],
max_wait_duration: '30m',
}
- const result = HogFlowsCreateBody.safeParse({
+ const result = HogFlowsCreateBody().safeParse({
name: 'Empty condition wait workflow',
actions: [
triggerAction,
@@ -105,7 +105,7 @@ describe('workflows create schema — action config', () => {
template_id: 'template-webhook',
inputs: { url: { value: 'https://example.com' } },
}
- const result = HogFlowsCreateBody.safeParse({
+ const result = HogFlowsCreateBody().safeParse({
name: 'Function workflow',
actions: [triggerAction, { id: 'fn_1', name: 'Webhook', type: 'function', config: functionConfig }],
})