3.0.0
TransformingProvider wraps another provider and modifies its components, enabling namespacing and renaming. When you use mount(namespace="..."), TransformingProvider is used under the hood.
Why Transform
When composing servers, you may encounter naming conflicts:Namespacing
The most common transformation is namespacing, which prefixes all component names:Namespace Rules
| Component Type | Original | With namespace="api" |
|---|---|---|
| Tool | my_tool | api_my_tool |
| Prompt | my_prompt | api_my_prompt |
| Resource | data://info | data://api/info |
| Template | data://{id} | data://api/{id} |
Tool Renaming
For more control, rename specific tools explicitly:Direct Provider Usage
You can useTransformingProvider directly via with_transforms():
Stacking Transformations
Transformations can be stacked - eachwith_transforms() creates a new wrapper:

