Skip to content

Transformed tools lose their icons #5687

Closed

Description

@asasemahmed

TransformedTool.from_tool builds the new tool from the parent's name, version, title, description, tags, annotations, meta and auth, but never passes icons. Any tool that goes through ToolTransform / ToolTransformConfig, Tool.from_tool, or FastMCP.mount(..., tool_names=...) is listed without the icons its parent declared.

Reproduction:

import asyncio
from mcp_types import Icon
from fastmcp import FastMCP, Client
from fastmcp.server.transforms import ToolTransform
from fastmcp.tools.tool_transform import ToolTransformConfig

async def main():
    s = FastMCP("s")

    @s.tool(icons=[Icon(src="https://example.com/t.png")])
    def t(x: int) -> int:
        return x

    s.add_transform(ToolTransform({"t": ToolTransformConfig(name="renamed")}))
    async with Client(s) as c:
        (tool,) = await c.list_tools()
        print(tool.name, tool.icons)

asyncio.run(main())

Actual output:

renamed None

Expected output:

renamed [Icon(src='https://example.com/t.png', mime_type=None, sizes=None, theme=None)]

The same loss happens for a mounted server's tool that is renamed with tool_names, while its prompts, resources and un-renamed tools keep their icons. Clients that render tool icons show them for some tools and not for others, and renaming a tool silently removes its icon.

Activity

  1. added
    bug
    server
    on Oct 12, 2026
  2. added a commit that references this issue on Oct 19, 2026
    ca89a3e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugserver

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions