mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-28 02:10:38 +02:00
Add TaskConfig for SEP-1686 execution modes
Expose the full MCP task execution modes (forbidden/optional/required) via TaskConfig instead of just boolean task=True/False.
This commit is contained in:
parent
8771f290bd
commit
a231ea4c3c
19 changed files with 854 additions and 263 deletions
|
|
@ -52,7 +52,7 @@ class TestToolFromFunction:
|
|||
"type": "object",
|
||||
"x-fastmcp-wrap-result": True,
|
||||
},
|
||||
"task": False,
|
||||
"task": {"mode": "forbidden"},
|
||||
"fn": HasName("add"),
|
||||
}
|
||||
)
|
||||
|
|
@ -100,7 +100,7 @@ class TestToolFromFunction:
|
|||
"type": "object",
|
||||
"x-fastmcp-wrap-result": True,
|
||||
},
|
||||
"task": False,
|
||||
"task": {"mode": "forbidden"},
|
||||
"fn": HasName("fetch_data"),
|
||||
}
|
||||
)
|
||||
|
|
@ -135,7 +135,7 @@ class TestToolFromFunction:
|
|||
"type": "object",
|
||||
"x-fastmcp-wrap-result": True,
|
||||
},
|
||||
"task": False,
|
||||
"task": {"mode": "forbidden"},
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -169,7 +169,7 @@ class TestToolFromFunction:
|
|||
"type": "object",
|
||||
"x-fastmcp-wrap-result": True,
|
||||
},
|
||||
"task": False,
|
||||
"task": {"mode": "forbidden"},
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ class TestToolFromFunction:
|
|||
"type": "object",
|
||||
},
|
||||
"output_schema": {"additionalProperties": True, "type": "object"},
|
||||
"task": False,
|
||||
"task": {"mode": "forbidden"},
|
||||
"fn": HasName("create_user"),
|
||||
}
|
||||
)
|
||||
|
|
@ -274,7 +274,7 @@ class TestToolFromFunction:
|
|||
"required": ["x"],
|
||||
"type": "object",
|
||||
},
|
||||
"task": False,
|
||||
"task": {"mode": "forbidden"},
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -307,7 +307,7 @@ class TestToolFromFunction:
|
|||
"required": ["_a", "_b"],
|
||||
"type": "object",
|
||||
},
|
||||
"task": False,
|
||||
"task": {"mode": "forbidden"},
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -362,7 +362,7 @@ class TestToolFromFunction:
|
|||
"type": "object",
|
||||
"x-fastmcp-wrap-result": True,
|
||||
},
|
||||
"task": False,
|
||||
"task": {"mode": "forbidden"},
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue