Skip to content

Mounted child tools lose execution.taskSupport in parent tools/list #3569

@nkaras

Description

@nkaras

What happened?

When a task-capable tool is defined on a child FastMCP server and that server is mounted into a parent server, the parent server's tools/list output does not include execution.taskSupport for the mounted tool.

Expected:

  • the mounted tool should advertise task support the same way the child tool does

Actual:

  • the mounted tool appears in tools/list, but execution is None

Example Code

import asyncio
from fastmcp import FastMCP

child = FastMCP("child")

@child.tool(task=True)
async def foo() -> dict:
    return {"ok": True}

parent = FastMCP("parent")
parent.mount(child)

async def demo():
    child_tools = await child.list_tools()
    parent_tools = await parent.list_tools()

    child_tool = next(t for t in child_tools if t.name == "foo")
    parent_tool = next(t for t in parent_tools if t.name == "foo")

    print("child:", child_tool.to_mcp_tool(name=child_tool.name).execution)
    print("parent:", parent_tool.to_mcp_tool(name=parent_tool.name).execution)

if __name__ == "__main__":
    asyncio.run(demo())

Observed output:

  • child: ToolExecution(taskSupport='optional')
  • parent: None

Version Information

FastMCP: 3.1.0
Python: 3.13
OS: linux

Metadata

Metadata

Assignees

Labels

bugSomething isn't working. Reports of errors, unexpected behavior, or broken functionality.serverRelated to FastMCP server implementation or server-side functionality.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions