Commit graph

367 commits

Author SHA1 Message Date
deepak-stratforge
2233b5844b feat(tool): validate and enforce default values
- Added validation to ensure all parameters listed in `exclude_args` exist in the function.
- Ensured parameters in `exclude_args` have default values to avoid runtime errors.
- Added test.
2025-05-29 20:05:18 +05:30
deepak-stratforge
138316715e feat(tool): add support for excluding arguments from tool definition
This introduces an `exclude_args` parameter to omit specified arguments
(such as `state`, `memory`, etc.).

It will exclude the mentioned args from the schema sent to the LLM and still allow them
to be passed when the tool is called.

This doesn't come with the MCP protocol but can be useful in many use cases.
2025-05-29 15:32:46 +05:30
Jeremiah Lowin
c4d941f671
Merge pull request #605 from davenpi/fix-unreachable-mounted-servers
Add graceful error handling for unreachable mounted servers
2025-05-28 16:07:30 -04:00
Jeremiah Lowin
05288fc507 Fix handling tools without descriptions 2025-05-27 09:08:24 -04:00
davenpi
b7607af17a Handle unreachable mounted servers. 2025-05-27 08:25:52 -04:00
Jeremiah Lowin
010170337f Ensure that tools/templates/prompts are compatible with callable objects 2025-05-23 18:53:55 -04:00
Jeremiah Lowin
b924dd54d4 Add tests 2025-05-23 17:31:46 -04:00
Jeremiah Lowin
ae960e2f5a Update tests for new names 2025-05-23 17:16:32 -04:00
Jeremiah Lowin
9350d558c6 Update test_openapi.py 2025-05-23 15:42:56 -04:00
Jeremiah Lowin
213abc4244 Pass client headers through to OpenAPI client 2025-05-23 12:38:24 -04:00
Jeremiah Lowin
6436adaaf3 Split into routemapfn and mcpcomponentfn 2025-05-23 11:03:57 -04:00
Jeremiah Lowin
2c922bf5d4 Merge branch 'main' into route_map_fn 2025-05-23 08:32:08 -04:00
Jeremiah Lowin
ef8bb6f631
Merge branch 'main' into custom-tags 2025-05-23 08:27:41 -04:00
Jeremiah Lowin
9a906f05cf Merge branch 'main' into custom-routes 2025-05-22 22:19:30 -04:00
Jeremiah Lowin
aa2747497c Add route_map_fn for fine control 2025-05-22 22:10:45 -04:00
Jeremiah Lowin
6cac09cf2a Add support for RouteMap tags, update docs 2025-05-22 21:59:16 -04:00
Jeremiah Lowin
702412e28b Remove custom names 2025-05-22 21:11:46 -04:00
Jeremiah Lowin
4c3bf80652 Add custom naming and deprecate all_routes_as_tools 2025-05-22 15:46:46 -04:00
Jeremiah Lowin
e6b1c6984c Update route map logic 2025-05-22 15:06:10 -04:00
Jeremiah Lowin
998de22a6e
Merge pull request #558 from jlowin/custom-routes
Ensure custom routes are respected
2025-05-22 12:26:08 -04:00
Jeremiah Lowin
189389a3a4 Ensure custom routes are respected 2025-05-22 12:20:29 -04:00
davenpi
9122833998 Expose model preferences in ctx.sample 2025-05-21 19:34:45 -04:00
Jeremiah Lowin
85c2acf66d Make resource prefix format configurable 2025-05-21 12:37:21 -04:00
Jeremiah Lowin
cec40ddfea Remove customizable separators; improve resource separator 2025-05-20 20:30:33 -04:00
nate nowack
c34beee8db
Merge pull request #521 from jlowin/add-better-error
better error when missing lifespan
2025-05-20 14:48:59 -05:00
zzstoatzz
7f46580c14 rm slop markers 2025-05-20 13:48:23 -05:00
Jeremiah Lowin
a39100bd05 Allow * Methods and all routes as tools shortcuts 2025-05-20 13:24:44 -04:00
Jeremiah Lowin
20dd0047c7 Update tests 2025-05-20 12:26:26 -04:00
Jeremiah Lowin
2cce73a133 Unify openapi 3.0 and 3.1 parsing 2025-05-20 12:12:47 -04:00
Jeremiah Lowin
a4f6ecd0be Ensure openapi path params are handled properly 2025-05-20 11:50:57 -04:00
Jeremiah Lowin
eadec83083 Add request id back to tests 2025-05-20 10:45:27 -04:00
Jeremiah Lowin
526b831bec Store the initialize result on the client 2025-05-19 20:49:03 -04:00
zzstoatzz
8d210ade05 try to fix test 2025-05-19 15:30:46 -05:00
zzstoatzz
e783775fc5 add tests 2025-05-19 15:08:46 -05:00
Jeremiah Lowin
9a2d92b46d Add as_proxy improvements and tests 2025-05-17 12:23:48 -04:00
Jeremiah Lowin
e76a076da5 Fix static checks 2025-05-17 11:47:00 -04:00
Jeremiah Lowin
c9648389c4 Store server instance as fastmcp_server 2025-05-17 11:38:40 -04:00
Jeremiah Lowin
6b4f700a59 Improve handling of exceptiongroups when raised in clients 2025-05-14 19:34:17 -04:00
Jeremiah Lowin
5dc64001b2 Add test for enum property 2025-05-14 14:24:44 -04:00
Jeremiah Lowin
ff318e655d Add reprs for OpenAPI objects 2025-05-14 13:42:20 -04:00
Jeremiah Lowin
08d54ef65b
Merge pull request #437 from davenpi/feat/remove-tool
feat: add support for removing tools from server
2025-05-13 18:36:18 -04:00
davenpi
d6f7dab9e6 feat: add support for removing tools from server 2025-05-13 16:39:04 -04:00
Jeremiah Lowin
6fa7c1704a Improve error handling for tools and resources 2025-05-13 14:19:55 -04:00
Jeremiah Lowin
456db4db63 Add test for no prefix 2025-05-10 15:50:03 -04:00
Jeremiah Lowin
b6d1b3f52f Deprecate transport-specific methods 2025-05-10 11:34:47 -04:00
Jeremiah Lowin
7f5c5878eb Allow passing custom middleware 2025-05-10 09:26:10 -04:00
Jeremiah Lowin
4355112cb3 Switch tests to use http 2025-05-07 21:06:00 -04:00
Jeremiah Lowin
a93bc1a12d Update lifespan tests 2025-05-07 12:21:10 -04:00
Jeremiah Lowin
9c936168cd Add integration tests for SSE 2025-05-07 11:04:47 -04:00
Jeremiah Lowin
4b4d806fd5 Note that get_http_request is deprecated 2025-05-06 22:24:26 -04:00