diff --git a/pkg/server/api/mcp/v1/schema.resolvers.go b/pkg/server/api/mcp/v1/schema.resolvers.go index ba6e28449..1ec3daec0 100644 --- a/pkg/server/api/mcp/v1/schema.resolvers.go +++ b/pkg/server/api/mcp/v1/schema.resolvers.go @@ -76,7 +76,12 @@ func (r *Resolver) ListThirdPartiesTool(ctx context.Context, req *mcp.CallToolRe cursor := types.NewCursor(input.Size, input.Cursor, pageOrderBy) - thirdPartyFilter := coredata.NewThirdPartyFilter(nil, input.Level, nil, nil, nil) + level := input.Level + if level == nil { + level = new(1) + } + + thirdPartyFilter := coredata.NewThirdPartyFilter(nil, level, nil, nil, nil) page, err := prb.ThirdParties.ListForOrganizationID(ctx, scope, input.OrganizationID, cursor, thirdPartyFilter) if err != nil { diff --git a/pkg/server/api/mcp/v1/specification.yaml b/pkg/server/api/mcp/v1/specification.yaml index 53c928d75..97c3afea3 100644 --- a/pkg/server/api/mcp/v1/specification.yaml +++ b/pkg/server/api/mcp/v1/specification.yaml @@ -663,7 +663,7 @@ components: description: Organization ID level: type: integer - description: Filter by level + description: Filter by hierarchy depth (1 = direct third party, 2+ = third party of a third party / indirect). Defaults to 1 when omitted. order_by: $ref: "#/components/schemas/ThirdPartyOrderBy" description: ThirdParty order by @@ -12606,7 +12606,7 @@ tools: $ref: "#/components/schemas/ListOrganizationsOutput" - name: listThirdParties title: List Third Parties - description: List all thirdParties for the organization + description: List thirdParties for the organization. By default only direct third parties (level 1) are returned; pass level to filter by hierarchy depth. hints: readonly: true destructive: false