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.

chore(mcp): tell agents where to get the role id for role tools (#105709)

Yasen84f957dc1e8f
diff --git a/products/platform_features/mcp/tools.yaml b/products/platform_features/mcp/tools.yaml
index f91ee4494d00..049f19a08e34 100644
--- a/products/platform_features/mcp/tools.yaml
+++ b/products/platform_features/mcp/tools.yaml
@@ -515,6 +515,9 @@ tools:
title: Get a specific role.
description: |
Get details of a specific role including its name, creation date, and creator.
+ param_overrides:
+ id:
+ description: Required. The role id from roles-list.
role-members-list:
operation: roles_role_memberships_list
enabled: true
@@ -527,6 +530,9 @@ tools:
title: List members of a role.
description: |
List all members assigned to a specific role. Shows who has which role in the organization.
+ param_overrides:
+ role_id:
+ description: Required. The role id from roles-list.
role-membership-get:
operation: roles_role_memberships_retrieve
enabled: false
diff --git a/services/mcp/src/tools/generated/platform_features.ts b/services/mcp/src/tools/generated/platform_features.ts
index 2d32f79a75e8..f169635e0fd8 100644
--- a/services/mcp/src/tools/generated/platform_features.ts
+++ b/services/mcp/src/tools/generated/platform_features.ts
@@ -786,7 +786,9 @@ const organizationsList = (): ToolBase<
const RoleGetSchema = () => {
const RolesRetrieveParams = orvalSchemas.RolesRetrieveParams()
- return RolesRetrieveParams.omit({ organization_id: true })
+ return RolesRetrieveParams.omit({ organization_id: true }).extend({
+ id: RolesRetrieveParams.shape['id'].describe('Required. The role id from roles-list.'),
+ })
}
const roleGet = (): ToolBase<ReturnType<typeof RoleGetSchema>, Schemas.Role> => ({
@@ -805,9 +807,11 @@ const roleGet = (): ToolBase<ReturnType<typeof RoleGetSchema>, Schemas.Role> =>
const RoleMembersListSchema = () => {
const RolesRoleMembershipsListParams = orvalSchemas.RolesRoleMembershipsListParams()
const RolesRoleMembershipsListQueryParams = orvalSchemas.RolesRoleMembershipsListQueryParams()
- return RolesRoleMembershipsListParams.omit({ organization_id: true }).extend(
- RolesRoleMembershipsListQueryParams.shape
- )
+ return RolesRoleMembershipsListParams.omit({ organization_id: true })
+ .extend(RolesRoleMembershipsListQueryParams.shape)
+ .extend({
+ role_id: RolesRoleMembershipsListParams.shape['role_id'].describe('Required. The role id from roles-list.'),
+ })
}
const roleMembersList = (): ToolBase<
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/role-get.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/role-get.json
index eae5486189be..60a178502f9f 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/role-get.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/role-get.json
@@ -2,7 +2,7 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"id": {
- "description": "A UUID string identifying this role.",
+ "description": "Required. The role id from roles-list.",
"type": "string"
}
},
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/role-members-list.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/role-members-list.json
index a417ad9532c9..1eb595ada4b4 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/role-members-list.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/role-members-list.json
@@ -10,6 +10,7 @@
"type": "number"
},
"role_id": {
+ "description": "Required. The role id from roles-list.",
"type": "string"
}
},