Commit graph

17 commits

Author SHA1 Message Date
Jeremiah Lowin
648684d2bb
Introduce ResourceResult as canonical resource return type (#2734) 2025-12-25 21:21:55 -05:00
Jeremiah Lowin
5f3bb05f99
Revert "Revert "Refactor resource behavior and add meta support (#2598)" (#2609)" (#2611)
This reverts commit 1efc4bc3ff.
2025-12-14 21:36:40 -05:00
Jeremiah Lowin
1efc4bc3ff
Revert "Refactor resource behavior and add meta support (#2598)" (#2609)
This reverts commit 12f2422e18.
2025-12-13 15:02:18 -05:00
Jeremiah Lowin
12f2422e18
Refactor resource behavior and add meta support (#2598)
* feat: make ResourceContent the canonical internal type for resources

Add Resource._read() private method that always returns ResourceContent,
maintaining backwards compatibility for custom resources returning str/bytes
from read(). Includes deprecation warning when str/bytes is returned.

* fix: address review feedback for ResourceContent

- Remove ResourceContent from root exports (import from fastmcp.resources)
- Fix FunctionResource.read() return type to str | bytes | ResourceContent
- Decode base64 blobs in proxy when receiving from remote servers
- Preserve meta in ProxyResource cached content

* fix: add empty result guards in proxy resource reads
2025-12-13 11:45:38 -05:00
Jeremiah Lowin
f1e3713fc6 Update test typing 2025-05-31 20:41:18 -04:00
Amerr, Ziad (ext) (DI SW ICS MNA RD QA QST 2)
4561d722ad Removed trailing whitespace 2025-05-19 20:14:59 +03:00
Amerr, Ziad (ext) (DI SW ICS MNA RD QA QST 2)
2bf349b09f Fixed formatting again 2025-05-19 20:13:52 +03:00
Amerr, Ziad (ext) (DI SW ICS MNA RD QA QST 2)
1393a2bb06 Reformatting, and adding copilot's suggestion 2025-05-19 20:12:07 +03:00
Amerr, Ziad (ext) (DI SW ICS MNA RD QA QST 2)
d944f6591e Skipping permission test error if the user has root privileges 2025-05-19 20:02:59 +03:00
Jeremiah Lowin
6fa7c1704a Improve error handling for tools and resources 2025-05-13 14:19:55 -04:00
Jeremiah Lowin
d27141a935 Refactor remote servers 2025-04-15 20:28:14 -04:00
Jeremiah Lowin
96485c8dfe restore 1.x code
Attempting to subclass and monkeypatch was becoming too difficult; inflexibility between low-level types and the requirements of new high-level APIs requires the potential for breaking changes, even if they don't face users.
2025-04-09 11:54:42 -04:00
Jeremiah Lowin
ca810729d7 Use upstream FastMCP 2025-04-01 18:35:57 -04:00
Jeremiah Lowin
83eb81ff7f Handle URL tests 2024-12-03 12:54:25 -05:00
justjoehere
de549c5aff Changes to accomodate windows users. 2024-12-02 15:08:20 -05:00
Jeremiah Lowin
55d7cd1488 Add template support 2024-11-30 10:29:34 -05:00
Jeremiah Lowin
4d7c7fe052 Update examples and tests 2024-11-29 20:32:15 -05:00