You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support for path convertor {value:path} in FastMCP #220
Currently we do not allow for matching paths in resource templates, meaning that
@app.resource("test://{foo}")
will not match test://foo/bar. This is intended. However at times people want to explicitly match paths. FastAPI offers in this case a path convertor, such that
@app.resource("test://{foo:path}")
would match test://foo/bar.
We should consider adding a convertor approach or something similar to resource templates.
Hello, I've addressed this in the pull request above.
The URI matching logic now supports multiple parameter types, not just {foo : path}, but also {foo : int}, {foo : float}, {foo : str} and {foo : uuid}. (defaults to {foo : str})
The design is also easily extensible to support additional types in the future.
Please review it.
Thank you!
Activity
beaterblank commentedon Oct 7, 2025
Hello, I'd like to work on this issue.
FastAPI uses starlette converters for this, like here: https://github.com/Kludex/starlette/blob/main/starlette/convertors.py
will implement something similar.
Feature Added:
beaterblank commentedon Oct 7, 2025
Hello, I've addressed this in the pull request above.
The URI matching logic now supports multiple parameter types, not just
{foo : path}, but also{foo : int},{foo : float},{foo : str}and{foo : uuid}. (defaults to{foo : str})The design is also easily extensible to support additional types in the future.
Please review it.
Thank you!
fernando-torres-blip-ai commentedon Dec 29, 2025
Any updates on this ?
beaterblank commentedon Dec 29, 2025
please check #1439