Skip to content

docs: add context-aware tool factory example#3264

Merged
jlowin merged 1 commit intoPrefectHQ:mainfrom
machov:fix/fastmcp-1841-context-aware-tool-factory-example
Feb 22, 2026
Merged

docs: add context-aware tool factory example#3264
jlowin merged 1 commit intoPrefectHQ:mainfrom
machov:fix/fastmcp-1841-context-aware-tool-factory-example

Conversation

@machov
Copy link
Copy Markdown
Contributor

@machov machov commented Feb 21, 2026

Fixes #1841

Adds a concrete code example for the Context-Aware Tool Factories pattern in the tool transformation docs. The example shows how to create a factory function that generates a user-specific tool by hiding the user_id parameter via Tool.from_tool() with ArgTransform(hide=True, default=...).

Updated both v2 and v3 docs.

@marvin-context-protocol marvin-context-protocol Bot added the documentation Updates to docs, examples, or guides. Primary change is documentation-related. label Feb 21, 2026
@jlowin
Copy link
Copy Markdown
Member

jlowin commented Feb 22, 2026

Thank you!

@jlowin jlowin merged commit c718406 into PrefectHQ:main Feb 22, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Updates to docs, examples, or guides. Primary change is documentation-related.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Example for Context-Aware Tool Factories

2 participants