Description
Context
#1685 implemented server-wide tool execution timeouts with a default of 300 seconds.
Motivation
Some tools may need different timeout values:
- Quick lookups:
get_weather() - 10 seconds
- Heavy processing:
analyze_dataset() - 20 minutes
Proposed API
# Server default
mcp = FastMCP("MyServer", tool_timeout_seconds=300)
# Per-tool override
@mcp.tool(timeout_seconds=1200) # 20 minutes
async def analyze_large_dataset(data: str) -> dict:
...
Questions
- Is this needed in practice, or is the server-wide timeout sufficient?
- Should
None mean "use server default" or "no timeout"?
- Should this be per-tool or per-call?
Non-Goals (for this issue)
- Client-side timeout control (separate concern)
- Retry policies (separate concern)
References
No response
Description
Context
#1685 implemented server-wide tool execution timeouts with a default of 300 seconds.
Motivation
Some tools may need different timeout values:
get_weather()- 10 secondsanalyze_dataset()- 20 minutesProposed API
Questions
Nonemean "use server default" or "no timeout"?Non-Goals (for this issue)
References
No response