ARCHIVED TRAINING / jlowin/fastmcp
jlowin__fastmcp-3235
This is a preserved training example. Membership in the current training wave has not been verified.
Problem statement
ToolTransform AttributeError: 'function' object has no attribute 'parameters' when creating tool without registering it in v3.0
### Description
When trying to create a tool using the decorator without registering it, same as [the docs proposal](https://gofastmcp.com/servers/transforms/tool-transformation#tooltransform) I got the following error
`Traceback (most recent call last):
File "/example.py", line 14, in <module>
better_search = Tool.from_tool(
^^^^^^^^^^^^^^^
File ".venv/lib/python3.11/site-packages/fastmcp/tools/tool.py", line 381, in from_tool
return TransformedTool.from_tool(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.11/site-packages/fastmcp/tools/tool_transform.py", line 479, in from_tool
parent_params = set(tool.parameters.get("properties", {}).keys())`
### Example Code
```Python
from fastmcp import FastMCP
from fastmcp.tools import Tool, tool
from fastmcp.tools.tool_transform import ArgTransform
# Create a tool without registering it
@tool
def search(q: str, limit: int = 10) -> list[str]:
"""Search for items."""
return [f"Result {i} for {q}" for i in range(limit)]
# Transform it before registration
better_search = Tool.from_tool(
search,
name="find_items",
description="Find items matching your search query.",
transform_args={
"q": ArgTransform(
name="query",
description="The search terms to look for.",
),
},
)
mcp = FastMCP("Server")
mcp.add_tool(better_search)
if __name__ == "__main__":
# Defaults to STDIO transport
mcp.run()
```
### Version Information
```Text
FastMCP version: 3.0.0
MCP version: 1.26.0
Python version: 3.11.13
Platform: Linux-6.6.87.2-microsoft-standard-WSL2-x86_64-with-glibc2.35
FastMCP root path: /.venv/lib/python3.11/site-packages
```
Training membership
opd_e4b_hybrid_v3 opd_e4b_onpolicy_v3 opd_e4b_pure_v6b opd_e4b_pure_v7 opd_e4b_pure_v7b rft_e4b_aligned_v2 rft_v1 rft_v2
Task issues extracted from preserved verified_rft_messages training examples. This is not a verified current RL wave manifest.
Task and snapshot provenance
Snapshot captured 2026-11-12T17:06:59.476467+00:00 · Autoresearch-Arena/gemma-4-developer-agent
{
"datasets": [
"opd_e4b_hybrid_v3",
"opd_e4b_onpolicy_v3",
"opd_e4b_pure_v6b",
"opd_e4b_pure_v7",
"opd_e4b_pure_v7b",
"rft_e4b_aligned_v2",
"rft_v1",
"rft_v2"
],
"examples": 21,
"instance_id": "jlowin__fastmcp-3235",
"problem_statement": "ToolTransform AttributeError: 'function' object has no attribute 'parameters' when creating tool without registering it in v3.0\n### Description\n\nWhen trying to create a tool using the decorator without registering it, same as [the docs proposal](https://gofastmcp.com/servers/transforms/tool-transformation#tooltransform) I got the following error\n\n`Traceback (most recent call last):\n File \"/example.py\", line 14, in <module>\n better_search = Tool.from_tool(\n ^^^^^^^^^^^^^^^\n File \".venv/lib/python3.11/site-packages/fastmcp/tools/tool.py\", line 381, in from_tool\n return TransformedTool.from_tool(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \".venv/lib/python3.11/site-packages/fastmcp/tools/tool_transform.py\", line 479, in from_tool\n parent_params = set(tool.parameters.get(\"properties\", {}).keys())`\n\n### Example Code\n\n```Python\nfrom fastmcp import FastMCP\nfrom fastmcp.tools import Tool, tool\nfrom fastmcp.tools.tool_transform import ArgTransform\n\n\n# Create a tool without registering it\n@tool\ndef search(q: str, limit: int = 10) -> list[str]:\n \"\"\"Search for items.\"\"\"\n return [f\"Result {i} for {q}\" for i in range(limit)]\n\n\n# Transform it before registration\nbetter_search = Tool.from_tool(\n search,\n name=\"find_items\",\n description=\"Find items matching your search query.\",\n transform_args={\n \"q\": ArgTransform(\n name=\"query\",\n description=\"The search terms to look for.\",\n ),\n },\n)\n\nmcp = FastMCP(\"Server\")\nmcp.add_tool(better_search)\n\nif __name__ == \"__main__\":\n # Defaults to STDIO transport\n mcp.run()\n```\n\n### Version Information\n\n```Text\nFastMCP version: 3.0.0\nMCP version: 1.26.0\nPython version: 3.11.13\nPlatform: Linux-6.6.87.2-microsoft-standard-WSL2-x86_64-with-glibc2.35\nFastMCP root path: /.venv/lib/python3.11/site-packages\n```",
"repo": "jlowin/fastmcp",
"source": "v2/experiments/train_data/opd_e4b_hybrid_v3/verified_rft_messages.jsonl",
"source_sha256": "bd326303eb127e8e5e08f03daf97bb88d79d19709d59f3f93f348bc56686a8df"
}{
"captured_at": "2026-11-12T17:06:59.476467+00:00",
"membership": "archived training",
"membership_evidence": "Task issues extracted from preserved verified_rft_messages training examples. This is not a verified current RL wave manifest.",
"name": "Preserved post-training task archive",
"source": "Autoresearch-Arena/gemma-4-developer-agent",
"source_revision": "016496de222aaafca0d4ee4c18efc63ba616f76e",
"sources": [
{
"path": "v2/experiments/train_data/opd_e4b_cispo_v5/verified_rft_messages.jsonl",
"sha256": "a43610ad0dfb6ace95375cfae09000f41afc0338cc925af870a4ade7a9b20c4c"
},
{
"path": "v2/experiments/train_data/opd_e4b_hybrid_v3/verified_rft_messages.jsonl",
"sha256": "bd326303eb127e8e5e08f03daf97bb88d79d19709d59f3f93f348bc56686a8df"
},
{
"path": "v2/experiments/train_data/opd_e4b_onpolicy_v3/verified_rft_messages.jsonl",
"sha256": "960c680e797e823a0d3a22f4b1d5ef60a72971373d703b877340b0c9126aaf68"
},
{
"path": "v2/experiments/train_data/opd_e4b_pure_v6a/verified_rft_messages.jsonl",
"sha256": "f045b7ca5b3883a1e2eaee81e1c02a4a1b53dd7b7b36e98bacb2ba5823a15148"
},
{
"path": "v2/experiments/train_data/opd_e4b_pure_v6b/verified_rft_messages.jsonl",
"sha256": "0f62460a9706eea5e1605255896f191ab00cb5706c5f1f2e1c293e9a718218dc"
},
{
"path": "v2/experiments/train_data/opd_e4b_pure_v7/verified_rft_messages.jsonl",
"sha256": "e37f7bd675322f3f81500b73559d60d5f602ca0537bf19f5cb06332c728c7b72"
},
{
"path": "v2/experiments/train_data/opd_e4b_pure_v7b/verified_rft_messages.jsonl",
"sha256": "b864bdc8695183433eef6e31cb8d33fad44ba3aded2170c1ade4ad5b2944ce23"
},
{
"path": "v2/experiments/train_data/opd_e4b_self_audit_v4/verified_rft_messages.jsonl",
"sha256": "0026023745afb8f3dc1c176dc7f7171157b4ad5a66656b524af218e8e19ceee6"
},
{
"path": "v2/experiments/train_data/rft_e4b_aligned_v2/verified_rft_messages.jsonl",
"sha256": "92a4515fee9d152b0d4c510ee3ce4caaaffe2003ba7584469f8027f174aab18c"
},
{
"path": "v2/experiments/train_data/rft_v1/verified_rft_messages.jsonl",
"sha256": "a42453ccd7ac7680b0a03865e8e7080bc8bf74c8d9d193b440c441ed46f8512b"
},
{
"path": "v2/experiments/train_data/rft_v2/verified_rft_messages.jsonl",
"sha256": "18f4b3bd7e651f83c6acab479c9475e3fa50dc652a384f309e97146983ac85ba"
}
]
}