Install the function-patch-and-transform Function into your cluster by creating a Function resource pointing to the crossplane-contrib/function-patch-and-transform image.
In your Composition, set spec.mode: Pipeline and define spec.pipeline as an ordered list of steps; place the function-patch-and-transform step with step.functionRef.name pointing to the installed Function.
Pass an input to the step under step.input with apiVersion: pt.fn.crossplane.io/v1beta1, kind: Resources, and a resources list that defines the desired managed resources with patch rules.
Define patches within each resource entry to copy fields from the composite resource (fromFieldPath) to the managed resource (toFieldPath) using the FromCompositeFieldPath patch type.
Chain multiple functions in the pipeline by adding additional steps; each step receives the entire desired state from the previous step and can modify or add resources before passing it to the next function.
Use the readiness.policy field in the resource definition within the input to specify when a composed resource is considered ready, propagating readiness status back to the composite resource.
Known gotchas
function-patch-and-transform handles connection details differently between Crossplane v1 and v2 style XRs; in v2, the function automatically composes a Secret for connection details rather than returning them to the Crossplane engine directly.
The pipeline is stateless per-reconcile; each reconcile loop calls all pipeline functions from scratch—do not rely on in-memory state between reconciliation cycles.
Patch path expressions use dot notation and array indexing; a typo in a fieldPath silently produces no patch rather than an error, so validate patches against real resource schemas with crossplane beta render.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp