Commit graph

60 commits

Author SHA1 Message Date
Jeremiah Lowin
20c6749de9
Allow direct instantiation of Prompt and Resource classes (#2031) 2025-10-08 21:06:41 -04:00
Jeremiah Lowin
35a8c32f61
Add RFC 6570 query parameter support to resource templates (#1971) 2025-09-30 16:28:09 -04:00
William Easton
fe4f31c2c7
Enable more type checking rules (#1775) 2025-09-07 11:11:44 -04:00
Jeremiah Lowin
19a4dd85d4
Ensure resource + template names are properly prefixed when importing/mounting (#1423) 2025-08-08 21:29:07 -04:00
Jeremiah Lowin
3fc2510110
Add meta parameter support to tools, resources, templates, and prompts decorators (#1294) 2025-07-29 17:16:05 -04:00
Jeremiah Lowin
0600834da4 Fix single-element list unwrapping in tool content
Single-element lists like [1] were being incorrectly unwrapped to "1"
in unstructured content while multi-element lists remained as lists.
This created inconsistent behavior where the structure was lost for
single items.

This fix ensures lists always preserve their structure in unstructured
content regardless of length, making behavior consistent and predictable.

Also removes pretty-printing from JSON serialization for more compact
output across tools, prompts, and resources.

Fixes #1064

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-07 12:07:16 -04:00
Jeremiah Lowin
228425e309
Avoid propagating logs (#1042)
* Avoid propagating logs

* Set up caplog for non-root loggers

* Update tests
2025-07-04 12:22:11 -04:00
Jeremiah Lowin
38036b1f42 Add automatic MCP list change notifications and client message handling
Implements comprehensive notification system for tools, resources, and prompts with automatic client updates and flexible message handlers.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-24 22:33:06 -04:00
Jeremiah Lowin
085c5b765b Update docs and tests 2025-06-19 17:06:54 -04:00
Jeremiah Lowin
2e31b2704b Update tests 2025-06-19 14:05:19 -04:00
Jeremiah Lowin
35e13ef9bf Update resource manager 2025-06-19 12:22:14 -04:00
Jeremiah Lowin
ad45f0572a Merge branch 'main' into include-exclude 2025-06-10 19:31:25 -04:00
Jeremiah Lowin
3095ce5e57 Fix field validator for resource 2025-06-10 09:43:48 -04:00
Jeremiah Lowin
956488635e Add support for tag-based include/exclude 2025-06-07 18:38:29 -04:00
Jeremiah Lowin
6b308a6651 Formalize template/functiontemplate 2025-06-04 11:29:59 -04:00
Jeremiah Lowin
3a0faf5fcf Formalize resource/functionresource replationship 2025-06-04 11:06:59 -04:00
Jeremiah Lowin
f1e3713fc6 Update test typing 2025-05-31 20:41:18 -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
53b067b4e7 Make error masking configurable 2025-05-22 09:08:16 -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
e7e301815f Handle template errors 2025-05-13 14:33:11 -04:00
Jeremiah Lowin
6fa7c1704a Improve error handling for tools and resources 2025-05-13 14:19:55 -04:00
Jeremiah Lowin
82aa53e09b Refactor context to avoid unecessary passing 2025-05-06 21:24:29 -04:00
Jeremiah Lowin
c449f1d697 Handle args/kwargs appropriately for various objects 2025-05-04 15:00:26 -04:00
Jeremiah Lowin
517b5358dd
Merge pull request #290 from jlowin/json
use pydantic_core.to_json
2025-04-30 18:12:27 -04:00
Jeremiah Lowin
87031a62de Improve context injection type checks 2025-04-30 18:03:52 -04:00
Jeremiah Lowin
a9253d3111 use pydantic_core.to_json 2025-04-30 17:29:38 -04:00
Jeremiah Lowin
713864aa9a Ensure servers expose template wildcards 2025-04-25 14:25:17 -04:00
Jeremiah Lowin
d73e87b053 Add resource template tests 2025-04-25 12:55:32 -04:00
Jeremiah Lowin
f2c5f0d708 Update test_resource_template.py 2025-04-24 15:07:06 -04:00
Jeremiah Lowin
4e076c7c8f Add wildcard params 2025-04-24 15:01:36 -04:00
Jeremiah Lowin
d27141a935 Refactor remote servers 2025-04-15 20:28:14 -04:00
Jeremiah Lowin
67fbb4c3e8 Ensure quoted URIs work; fix proxy template issue 2025-04-15 12:54:58 -04:00
Jeremiah Lowin
4de2469d29 Improve matching logic for quoted chars 2025-04-15 11:31:10 -04:00
Jeremiah Lowin
c2ca6e1fa2 Fix matching logic 2025-04-15 11:06:51 -04:00
Jeremiah Lowin
faa8944cfd Fix tests 2025-04-15 10:11:06 -04:00
Jeremiah Lowin
9fdcb8ac93 Update matching logic for resources 2025-04-15 10:04:41 -04:00
Jeremiah Lowin
ed1463632d Add key for storing resources 2025-04-15 09:50:44 -04:00
Jeremiah Lowin
6e309e1354 Fix bug with duplicate behavior == ignore 2025-04-15 09:33:23 -04:00
Jeremiah Lowin
649329351b permit optional resource template args 2025-04-15 01:17:59 -04:00
Jeremiah Lowin
3ea0685a17 Expand support for various method interactions 2025-04-13 21:39:19 -04:00
Jeremiah Lowin
f0d07e5f04 Add tags, improve duplicate import behavior 2025-04-12 11:20:25 -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
728aeec293 Permit empty prefixes 2025-04-07 18:52:00 -04:00
Jeremiah Lowin
9b89715294 Support mounting FastMCPs as sub-servers 2025-04-07 17:54:55 -04:00
Jeremiah Lowin
ca810729d7 Use upstream FastMCP 2025-04-01 18:35:57 -04:00
Jeremiah Lowin
fae91fa2f6 Fix tests 2024-12-03 13:58:29 -05:00