Skip to content

filter tools after creating json schemas #116

Open
@RikJux

Description

@RikJux

Describe the bug
The application of the tool filters here is executed inside the setup_server method of class FastApiMCP after the method that creates all the json schemas for all routes

This is a problem as it creates schemas for routes that will be filtered out and it doesn't allow support of mcp into legacy fastapi applications that has routes that are not compatible with the code

To Reproduce
Try to create a fastapi app with a route where Body is not a pydantic BaseModel and a route with Bodya pydantic BaseModel
Then create the fastapi mcp using 'include_operations' to include only the route with Body a pydantic model
It will break on the generation of the json schema you don't need.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions