: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(mcp): Apply string-int casting to further MCP tools (#58116)
Marcel Poelkerf310700bb511
diff --git a/products/actions/mcp/tools.yaml b/products/actions/mcp/tools.yamlindex f57ca76261b1..9d5d304ce6f1 100644--- a/products/actions/mcp/tools.yaml+++ b/products/actions/mcp/tools.yaml@@ -69,6 +69,9 @@ tools:description: >Get a specific action by ID. Returns the action configuration including all steps and their triggerconditions.+ param_overrides:+ id:+ cast: string-intui_app: actionaction-update:operation: actions_partial_updatediff --git a/products/annotations/mcp/tools.yaml b/products/annotations/mcp/tools.yamlindex 99692d1283c5..ddb5d5799038 100644--- a/products/annotations/mcp/tools.yaml+++ b/products/annotations/mcp/tools.yaml@@ -54,6 +54,9 @@ tools:description: >Retrieve a single annotation by ID from the current project. Use this when you already know the annotationID and want complete details.+ param_overrides:+ id:+ cast: string-intannotations-list:operation: annotations_listenabled: truediff --git a/products/cohorts/mcp/tools.yaml b/products/cohorts/mcp/tools.yamlindex 38fd5b31ed05..bb2c7100b376 100644--- a/products/cohorts/mcp/tools.yaml+++ b/products/cohorts/mcp/tools.yaml@@ -87,6 +87,11 @@ tools:to get full details including filters, calculation status,and query definition.+ param_overrides:+ limit:+ cast: string-int+ offset:+ cast: string-intui_app: cohort-listresponse:include:@@ -122,6 +127,9 @@ tools:- last_error_message- count- experiment_set+ param_overrides:+ id:+ cast: string-intui_app: cohortcohorts-persons-retrieve:operation: cohorts_persons_retrieve@@ -140,6 +148,9 @@ tools:description: >Get a specific cohort by ID. Returns the cohort name, description, filters (for dynamic cohorts), count ofmatching users, and calculation status.+ param_overrides:+ id:+ cast: string-intui_app: cohortcohorts-rm-person-from-static-cohort-partial-update:operation: cohorts_remove_person_from_static_cohort_partial_updatediff --git a/products/dashboards/mcp/tools.yaml b/products/dashboards/mcp/tools.yamlindex 561531a38eab..c00f21825bf1 100644--- a/products/dashboards/mcp/tools.yaml+++ b/products/dashboards/mcp/tools.yaml@@ -87,6 +87,9 @@ tools:title: Delete dashboarddescription: |Delete a dashboard by ID. The dashboard will be soft-deleted and no longer appear in lists.+ param_overrides:+ id:+ cast: string-intsoft_delete: truedashboard-get:operation: dashboards_retrieve@@ -106,6 +109,9 @@ tools:insight-query for a single insight. Supports variables_override and filters_override query params; on thisendpoint they affect only the merged `filters` and `variables` fields in the response (preview). To executeinsights with the same overrides, pass the same query params to dashboard-insights-run.+ param_overrides:+ id:+ cast: string-intresponse:exclude:- effective_restriction_level@@ -159,6 +165,9 @@ tools:refresh to 'blocking' for fresh results. Set format to 'optimized' (default) for LLM-friendly text tables or'json' for raw query results. Supports variables_override and filters_override query params to run insightswith one-off overrides without persisting; see the parameter descriptions for the exact JSON shape required.+ param_overrides:+ id:+ cast: string-intdashboard-reorder-tiles:operation: dashboards_reorder_tiles_createenabled: true@@ -213,6 +222,9 @@ tools:- persisted_filters- persisted_variables- _create_in_folder+ param_overrides:+ id:+ cast: string-intresponse:exclude:- effective_restriction_level@@ -294,6 +306,11 @@ tools:filters by tag and pinned status are also supported. Returns name, description, pinned status, tags, andcreation metadata. Tiles and insights are not included — use dashboard-get to fetch a dashboard's tiles,then dashboard-insights-run to fetch the actual data for each insight.+ param_overrides:+ limit:+ cast: string-int+ offset:+ cast: string-intdashboards-move-tile-partial-update:operation: dashboards_move_tile_partial_updateenabled: falsediff --git a/products/feature_flags/mcp/tools.yaml b/products/feature_flags/mcp/tools.yamlindex 54802eb87ac9..d94cd5a3d8df 100644--- a/products/feature_flags/mcp/tools.yaml+++ b/products/feature_flags/mcp/tools.yaml@@ -50,6 +50,9 @@ tools:title: Delete feature flagdescription: |Soft-delete a feature flag by ID in the current project.+ param_overrides:+ id:+ cast: string-intsoft_delete: truefeature-flag-get-all:operation: feature_flags_list@@ -71,6 +74,10 @@ tools:description:Search by feature flag key or name (case-insensitive). Use this to find the flag ID for get/update/deletetools.+ limit:+ cast: string-int+ offset:+ cast: string-intresponse:include:- id@@ -92,6 +99,9 @@ tools:title: Get feature flag definitiondescription: |Get a feature flag by ID.+ param_overrides:+ id:+ cast: string-intfeature-flags-activity-retrieve:operation: feature_flags_activity_retrieveenabled: true@@ -105,6 +115,9 @@ tools:description: >Get the audit trail for a specific feature flag by ID. Returns a paginated list of changes including whomade changes, what was changed, and when. Use limit and page query params for pagination.+ param_overrides:+ id:+ cast: string-intfeature-flags-all-activity-retrieve:operation: feature_flags_all_activity_retrieveenabled: false@@ -150,6 +163,9 @@ tools:description: >Get other active feature flags that depend on this flag. Use this to understand flag dependency chainsbefore making changes to a flag's rollout conditions or disabling it.+ param_overrides:+ id:+ cast: string-intfeature-flags-enrich-usage-dashboard-create:operation: feature_flags_enrich_usage_dashboard_createenabled: false@@ -192,6 +208,9 @@ tools:description: >Check the health and evaluation status of a feature flag by ID. Returns a status (active, stale, deleted, orunknown) and a human-readable reason explaining the status.+ param_overrides:+ id:+ cast: string-intfeature-flags-test-evaluation-create:operation: feature_flags_test_evaluation_createenabled: false@@ -318,3 +337,6 @@ tools:- active- tags- evaluation_contexts+ param_overrides:+ id:+ cast: string-intdiff --git a/products/persons/mcp/tools.yaml b/products/persons/mcp/tools.yamlindex 166ba32218bc..830db1f0e1e3 100644--- a/products/persons/mcp/tools.yaml+++ b/products/persons/mcp/tools.yaml@@ -91,6 +91,11 @@ tools:exclude_params:- format- properties+ param_overrides:+ limit:+ cast: string-int+ offset:+ cast: string-intresponse:include:- iddiff --git a/products/platform_features/mcp/tools.yaml b/products/platform_features/mcp/tools.yamlindex a3c8ee70bd13..da9a271e1a76 100644--- a/products/platform_features/mcp/tools.yaml+++ b/products/platform_features/mcp/tools.yaml@@ -26,6 +26,9 @@ tools:param_overrides:page_size:default: 10+ cast: string-int+ page:+ cast: string-inturl_prefix: /activityresponse:include:diff --git a/products/product_analytics/mcp/tools.yaml b/products/product_analytics/mcp/tools.yamlindex 6dd244c98822..d9f34cd3a531 100644--- a/products/product_analytics/mcp/tools.yaml+++ b/products/product_analytics/mcp/tools.yaml@@ -257,6 +257,11 @@ tools:- basic- format- refresh+ param_overrides:+ limit:+ cast: string-int+ offset:+ cast: string-intresponse:include:- iddiff --git a/services/mcp/definitions/core.yaml b/services/mcp/definitions/core.yamlindex a082e4848acd..fdc6d2e60951 100644--- a/services/mcp/definitions/core.yaml+++ b/services/mcp/definitions/core.yaml@@ -449,6 +449,7 @@ tools:param_overrides:id:description: Project ID, or `@current` to fetch the caller's active project.+ cast: string-intresponse:exclude:- secret_api_token@@ -510,6 +511,7 @@ tools:param_overrides:id:description: Project ID, or `@current` to target the caller's active project.+ cast: string-intprojects-create:operation: organizations_projects_createenabled: falsediff --git a/services/mcp/src/tools/generated/actions.ts b/services/mcp/src/tools/generated/actions.tsindex fcda8ac93fa1..52081b3bba73 100644--- a/services/mcp/src/tools/generated/actions.ts+++ b/services/mcp/src/tools/generated/actions.ts@@ -11,6 +11,7 @@ import {ActionsRetrieveParams,} 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'@@ -71,7 +72,9 @@ const actionDelete = (): ToolBase<typeof ActionDeleteSchema, Schemas.Action> =>},})-const ActionGetSchema = ActionsRetrieveParams.omit({ project_id: true })+const ActionGetSchema = ActionsRetrieveParams.omit({ project_id: true }).extend({+ id: z.preprocess(castStringToInt, ActionsRetrieveParams.shape['id']),+})const actionGet = (): ToolBase<typeof ActionGetSchema, WithPostHogUrl<Schemas.Action>> =>withUiApp('action', {diff --git a/services/mcp/src/tools/generated/annotations.ts b/services/mcp/src/tools/generated/annotations.tsindex efe153ebb7cc..0d1a40d43f4c 100644--- a/services/mcp/src/tools/generated/annotations.ts+++ b/services/mcp/src/tools/generated/annotations.ts@@ -10,6 +10,7 @@ import {AnnotationsPartialUpdateParams,AnnotationsRetrieveParams,} from '@/generated/annotations/api'+import { castStringToInt } from '@/tools/cast-helpers'import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'@@ -60,7 +61,9 @@ const annotationDelete = (): ToolBase<typeof AnnotationDeleteSchema, Schemas.Ann},})-const AnnotationRetrieveSchema = AnnotationsRetrieveParams.omit({ project_id: true })+const AnnotationRetrieveSchema = AnnotationsRetrieveParams.omit({ project_id: true }).extend({+ id: z.preprocess(castStringToInt, AnnotationsRetrieveParams.shape['id']),+})const annotationRetrieve = (): ToolBase<typeof AnnotationRetrieveSchema, Schemas.Annotation> => ({name: 'annotation-retrieve',diff --git a/services/mcp/src/tools/generated/cohorts.ts b/services/mcp/src/tools/generated/cohorts.tsindex 5f02a3197938..37be1a664918 100644--- a/services/mcp/src/tools/generated/cohorts.ts+++ b/services/mcp/src/tools/generated/cohorts.ts@@ -14,6 +14,7 @@ import {CohortsRetrieveParams,} from '@/generated/cohorts/api'import { withUiApp } from '@/resources/ui-apps'+import { castStringToInt } from '@/tools/cast-helpers'import { withPostHogUrl, pickResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'@@ -78,7 +79,10 @@ const cohortsCreate = (): ToolBase<typeof CohortsCreateSchema, WithPostHogUrl<Sc},})-const CohortsListSchema = CohortsListQueryParams+const CohortsListSchema = CohortsListQueryParams.extend({+ limit: z.preprocess(castStringToInt, CohortsListQueryParams.shape['limit']).optional(),+ offset: z.preprocess(castStringToInt, CohortsListQueryParams.shape['offset']).optional(),+})const cohortsList = (): ToolBase<typeof CohortsListSchema, WithPostHogUrl<Schemas.PaginatedCohortList>> =>withUiApp('cohort-list', {@@ -113,9 +117,9 @@ 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-)+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 cohortsPartialUpdate = (): ToolBase<typeof CohortsPartialUpdateSchema, WithPostHogUrl<Schemas.Cohort>> =>withUiApp('cohort', {@@ -154,7 +158,9 @@ const cohortsPartialUpdate = (): ToolBase<typeof CohortsPartialUpdateSchema, Wit},})-const CohortsRetrieveSchema = CohortsRetrieveParams.omit({ project_id: true })+const CohortsRetrieveSchema = CohortsRetrieveParams.omit({ project_id: true }).extend({+ id: z.preprocess(castStringToInt, CohortsRetrieveParams.shape['id']),+})const cohortsRetrieve = (): ToolBase<typeof CohortsRetrieveSchema, WithPostHogUrl<Schemas.Cohort>> =>withUiApp('cohort', {diff --git a/services/mcp/src/tools/generated/core.ts b/services/mcp/src/tools/generated/core.tsindex 1d8a53f275c6..03a128023ef1 100644--- a/services/mcp/src/tools/generated/core.ts+++ b/services/mcp/src/tools/generated/core.ts@@ -19,12 +19,16 @@ import {UsersPartialUpdateParams,UsersRetrieveParams,} from '@/generated/core/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 ProjectGetSchema = OrganizationsProjectsRetrieveParams.omit({ organization_id: true }).extend({- id: OrganizationsProjectsRetrieveParams.shape['id'].describe(- "Project ID, or `@current` to fetch the caller's active project."+ id: z.preprocess(+ castStringToInt,+ OrganizationsProjectsRetrieveParams.shape['id'].describe(+ "Project ID, or `@current` to fetch the caller's active project."+ )),})@@ -50,8 +54,11 @@ const projectGet = (): ToolBase<typeof ProjectGetSchema, Schemas.ProjectBackwardconst ProjectSettingsUpdateSchema = OrganizationsProjectsPartialUpdateParams.omit({ organization_id: true }).extend(OrganizationsProjectsPartialUpdateBody.shape).extend({- id: OrganizationsProjectsPartialUpdateParams.shape['id'].describe(- "Project ID, or `@current` to target the caller's active project."+ id: z.preprocess(+ castStringToInt,+ OrganizationsProjectsPartialUpdateParams.shape['id'].describe(+ "Project ID, or `@current` to target the caller's active project."+ )),})diff --git a/services/mcp/src/tools/generated/dashboards.ts b/services/mcp/src/tools/generated/dashboards.tsindex 06be0ad0c926..e211b32e4966 100644--- a/services/mcp/src/tools/generated/dashboards.ts+++ b/services/mcp/src/tools/generated/dashboards.ts@@ -15,6 +15,7 @@ import {DashboardsRunInsightsRetrieveParams,DashboardsRunInsightsRetrieveQueryParams,} from '@/generated/dashboards/api'+import { castStringToInt } from '@/tools/cast-helpers'import { withPostHogUrl, omitResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'@@ -107,7 +108,9 @@ const dashboardCreate = (): ToolBase<typeof DashboardCreateSchema, WithPostHogUr},})-const DashboardDeleteSchema = DashboardsDestroyParams.omit({ project_id: true })+const DashboardDeleteSchema = DashboardsDestroyParams.omit({ project_id: true }).extend({+ id: z.preprocess(castStringToInt, DashboardsDestroyParams.shape['id']),+})const dashboardDelete = (): ToolBase<typeof DashboardDeleteSchema, Schemas.Dashboard> => ({name: 'dashboard-delete',@@ -125,6 +128,7 @@ const dashboardDelete = (): ToolBase<typeof DashboardDeleteSchema, Schemas.Dashbconst 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())])@@ -196,6 +200,7 @@ const dashboardGet = (): ToolBase<typeof DashboardGetSchema, WithPostHogUrl<Scheconst 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())])@@ -255,9 +260,9 @@ const dashboardReorderTiles = (): ToolBase<typeof DashboardReorderTilesSchema, W},})-const DashboardUpdateSchema = DashboardsPartialUpdateParams.omit({ project_id: true }).extend(- DashboardsPartialUpdateBody.shape-)+const DashboardUpdateSchema = DashboardsPartialUpdateParams.omit({ project_id: true })+ .extend(DashboardsPartialUpdateBody.shape)+ .extend({ id: z.preprocess(castStringToInt, DashboardsPartialUpdateParams.shape['id']) })const dashboardUpdate = (): ToolBase<typeof DashboardUpdateSchema, WithPostHogUrl<Schemas.Dashboard>> => ({name: 'dashboard-update',@@ -344,7 +349,10 @@ const dashboardUpdate = (): ToolBase<typeof DashboardUpdateSchema, WithPostHogUr},})-const DashboardsGetAllSchema = DashboardsListQueryParams.omit({ format: true })+const DashboardsGetAllSchema = 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,diff --git a/services/mcp/src/tools/generated/feature_flags.ts b/services/mcp/src/tools/generated/feature_flags.tsindex b528521e566b..0fdfaee457ad 100644--- a/services/mcp/src/tools/generated/feature_flags.ts+++ b/services/mcp/src/tools/generated/feature_flags.ts@@ -23,6 +23,7 @@ import {ScheduledChangesPartialUpdateParams,ScheduledChangesRetrieveParams,} from '@/generated/feature_flags/api'+import { castStringToInt } from '@/tools/cast-helpers'import { withPostHogUrl, pickResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'@@ -61,7 +62,9 @@ const createFeatureFlag = (): ToolBase<typeof CreateFeatureFlagSchema, WithPostH},})-const DeleteFeatureFlagSchema = FeatureFlagsDestroyParams.omit({ project_id: true })+const DeleteFeatureFlagSchema = FeatureFlagsDestroyParams.omit({ project_id: true }).extend({+ id: z.preprocess(castStringToInt, FeatureFlagsDestroyParams.shape['id']),+})const deleteFeatureFlag = (): ToolBase<typeof DeleteFeatureFlagSchema, Schemas.FeatureFlag> => ({name: 'delete-feature-flag',@@ -81,6 +84,8 @@ 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 featureFlagGetAll = (): ToolBase<@@ -126,7 +131,9 @@ const featureFlagGetAll = (): ToolBase<},})-const FeatureFlagGetDefinitionSchema = FeatureFlagsRetrieveParams.omit({ project_id: true })+const FeatureFlagGetDefinitionSchema = FeatureFlagsRetrieveParams.omit({ project_id: true }).extend({+ id: z.preprocess(castStringToInt, FeatureFlagsRetrieveParams.shape['id']),+})const featureFlagGetDefinition = (): ToolBase<typeof FeatureFlagGetDefinitionSchema,@@ -144,9 +151,9 @@ const featureFlagGetDefinition = (): ToolBase<},})-const FeatureFlagsActivityRetrieveSchema = FeatureFlagsActivityRetrieveParams.omit({ project_id: true }).extend(- FeatureFlagsActivityRetrieveQueryParams.shape-)+const FeatureFlagsActivityRetrieveSchema = FeatureFlagsActivityRetrieveParams.omit({ project_id: true })+ .extend(FeatureFlagsActivityRetrieveQueryParams.shape)+ .extend({ id: z.preprocess(castStringToInt, FeatureFlagsActivityRetrieveParams.shape['id']) })const featureFlagsActivityRetrieve = (): ToolBase<typeof FeatureFlagsActivityRetrieveSchema,@@ -203,7 +210,9 @@ const featureFlagsCopyFlagsCreate = (): ToolBase<},})-const FeatureFlagsDependentFlagsRetrieveSchema = FeatureFlagsDependentFlagsListParams.omit({ project_id: true })+const FeatureFlagsDependentFlagsRetrieveSchema = FeatureFlagsDependentFlagsListParams.omit({ project_id: true }).extend(+ { id: z.preprocess(castStringToInt, FeatureFlagsDependentFlagsListParams.shape['id']) }+)const featureFlagsDependentFlagsRetrieve = (): ToolBase<typeof FeatureFlagsDependentFlagsRetrieveSchema,@@ -243,7 +252,9 @@ const featureFlagsEvaluationReasonsRetrieve = (): ToolBase<},})-const FeatureFlagsStatusRetrieveSchema = FeatureFlagsStatusRetrieveParams.omit({ project_id: true })+const FeatureFlagsStatusRetrieveSchema = FeatureFlagsStatusRetrieveParams.omit({ project_id: true }).extend({+ id: z.preprocess(castStringToInt, FeatureFlagsStatusRetrieveParams.shape['id']),+})const featureFlagsStatusRetrieve = (): ToolBase<typeof FeatureFlagsStatusRetrieveSchema,@@ -432,9 +443,9 @@ const scheduledChangesUpdate = (): ToolBase<typeof ScheduledChangesUpdateSchema,},})-const UpdateFeatureFlagSchema = FeatureFlagsPartialUpdateParams.omit({ project_id: true }).extend(- FeatureFlagsPartialUpdateBody.shape-)+const UpdateFeatureFlagSchema = FeatureFlagsPartialUpdateParams.omit({ project_id: true })+ .extend(FeatureFlagsPartialUpdateBody.shape)+ .extend({ id: z.preprocess(castStringToInt, FeatureFlagsPartialUpdateParams.shape['id']) })const updateFeatureFlag = (): ToolBase<typeof UpdateFeatureFlagSchema, WithPostHogUrl<Schemas.FeatureFlag>> => ({name: 'update-feature-flag',diff --git a/services/mcp/src/tools/generated/persons.ts b/services/mcp/src/tools/generated/persons.tsindex 16e608216c6b..6c5b4be8d3e2 100644--- a/services/mcp/src/tools/generated/persons.ts+++ b/services/mcp/src/tools/generated/persons.ts@@ -13,6 +13,7 @@ import {PersonsUpdatePropertyCreateParams,PersonsValuesRetrieveQueryParams,} 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'@@ -66,7 +67,10 @@ const personsCohortsRetrieve = (): ToolBase<typeof PersonsCohortsRetrieveSchema,},})-const PersonsListSchema = PersonsListQueryParams.omit({ format: true, properties: true })+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 personsList = (): ToolBase<typeof PersonsListSchema, WithPostHogUrl<Schemas.PaginatedPersonRecordList>> => ({name: 'persons-list',diff --git a/services/mcp/src/tools/generated/platform_features.ts b/services/mcp/src/tools/generated/platform_features.tsindex 3974b97f4331..8f496e8e09d3 100644--- a/services/mcp/src/tools/generated/platform_features.ts+++ b/services/mcp/src/tools/generated/platform_features.ts@@ -23,11 +23,15 @@ import {UserHomeSettingsPartialUpdateParams,UserHomeSettingsRetrieveParams,} from '@/generated/platform_features/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 ActivityLogListSchema = ActivityLogListQueryParams.extend({- page_size: ActivityLogListQueryParams.shape['page_size'].default(10).optional(),+ page_size: z+ .preprocess(castStringToInt, ActivityLogListQueryParams.shape['page_size'].default(10).optional())+ .optional(),+ page: z.preprocess(castStringToInt, ActivityLogListQueryParams.shape['page']).optional(),})const activityLogList = (): ToolBase<diff --git a/services/mcp/src/tools/generated/product_analytics.ts b/services/mcp/src/tools/generated/product_analytics.tsindex f35cc78430ec..934eecc596fd 100644--- a/services/mcp/src/tools/generated/product_analytics.ts+++ b/services/mcp/src/tools/generated/product_analytics.ts@@ -15,6 +15,7 @@ import {InsightsRetrieveQueryParams,InsightsTrendingRetrieveQueryParams,} from '@/generated/product_analytics/api'+import { castStringToInt } from '@/tools/cast-helpers'import { withPostHogUrl, omitResponseFields, pickResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'@@ -363,7 +364,10 @@ const insightsAllActivityRetrieve = (): ToolBase<},})-const InsightsListSchema = InsightsListQueryParams.omit({ format: true, basic: true, refresh: true })+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 insightsList = (): ToolBase<typeof InsightsListSchema, WithPostHogUrl<Schemas.PaginatedInsightList>> => ({name: 'insights-list',