William Easton
664b67d26f
Fix exclusion of content helpers if they are in a list
2025-10-03 15:02:26 -05:00
Jeremiah Lowin
a41600d838
Fix: Remove JSON schema title metadata while preserving parameters named 'title' ( #1872 )
2025-09-23 10:19:34 -04:00
William Easton
64010ff276
Cleanup content conversion
2025-09-06 17:32:33 -05:00
William Easton
d7a74419b2
Preserve order in mixed text/image tool returns ( #1704 )
...
Co-authored-by: William Easton <strawgate@users.noreply.github.com>
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2025-09-06 14:22:29 -04:00
William Easton
94b1eb9d6e
feat: introduce inline snapshots ( #1605 )
...
Co-authored-by: William Easton <strawgate@users.noreply.github.com>
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2025-08-25 10:08:55 -04:00
Jeremiah Lowin
1df4771909
Ensure transformed tools generate structured content ( #1443 )
2025-08-11 12:34:43 -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
nate nowack
0977d552ff
Fix tool output schema generation to respect Pydantic serialization aliases ( #1148 )
...
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-15 07:08:56 -07: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
7e0a237945
Fix schema wrapping for non-object union types in output schemas
2025-06-30 14:12:40 -04:00
Jeremiah Lowin
7d3dcdca03
Add tests for title priority logic in tools
...
- Test that explicit title takes priority over annotations.title
- Test that annotations.title is used as fallback when no explicit title
- Ensures the improved to_mcp_tool logic works correctly
- Add proper type guards for annotations None checks
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-28 19:58:38 -04:00
Jeremiah Lowin
24deabf568
Add title field support to FastMCP components
...
- Add optional title field to FastMCPComponent base class
- Support title parameter in all component decorators (@tool, @resource, @prompt)
- Include title in MCP protocol serialization when provided
- Add get_display_name() method to prefer title over name for display
- Add comprehensive tests for title functionality
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-28 18:11:29 -04:00
Jeremiah Lowin
c412a63d4e
Update docs
2025-06-27 22:38:55 -04:00
Jeremiah Lowin
5520102821
Update failing tests
2025-06-27 22:06:35 -04:00
Jeremiah Lowin
b3799e7a73
Update typing
2025-06-27 21:54:17 -04:00
Jeremiah Lowin
db24c85359
Update all tests
2025-06-27 21:41:37 -04:00
Jeremiah Lowin
a7eb2da273
Update output schema control
2025-06-27 20:17:10 -04:00
Jeremiah Lowin
d8dc28b9b2
Add structured content & update almost all tests
2025-06-27 15:40:52 -04:00
Jeremiah Lowin
1e29149d5f
Merge branch 'main' into output-schema
2025-06-26 19:30:35 -04:00
Jeremiah Lowin
7b9696405b
Remove legacy json parsing
...
Because the server now validates inputs, its no longer viable to provide a JSON string where e.g. an array is expected, so we can entirely remove FastMCP's "legacy json parsing" support from 1.x.
This is a breaking change (for legacy opt-in behavior)
2025-06-26 18:19:43 -04:00
Jeremiah Lowin
cc69e56758
Add output schema to tool decorator
2025-06-20 18:58:23 -04:00
Jeremiah Lowin
3bc585788f
Add output schema to tools
2025-06-20 17:54:07 -04:00
Jeremiah Lowin
02b2ec1adf
Update types and tests for upcoming SDK release
2025-06-20 09:56:21 -04:00
Goro
4c60119767
Add missing tests
2025-06-16 08:10:34 +02:00
Goro
57e0b03711
Run pre-commit and fix typing issues
2025-06-16 07:12:41 +02:00
Goro
d2b2243957
Add file utility type and tests
2025-06-16 00:23:11 +02:00
Jeremiah Lowin
06dcff3b3b
Add tests
2025-06-14 09:22:29 -04:00
Jeremiah Lowin
46ab813de6
Deprecate top-level import
2025-06-14 09:12:21 -04:00
Jeremiah Lowin
d1549c3d35
Remove empty parens
2025-06-04 15:37:55 -04:00
Jeremiah Lowin
7d520ec5d1
Use strict basemodel for Prompt; relax from_function deprecation
2025-06-04 10:46:48 -04:00
Jeremiah Lowin
0b8bf825c1
Merge branch 'main' into transform-tools
2025-06-04 10:22:15 -04:00
Jeremiah Lowin
3a3c01708d
Split Tool into Tool and FunctionTool
2025-06-04 10:19:14 -04:00
William Easton
246111bba7
Fix missing import
2025-06-02 10:08:48 -05:00
William Easton
b57f5fd9fc
Merge branch 'main' into tool_tests
2025-06-01 23:20:43 -05:00
Jeremiah Lowin
f1e3713fc6
Update test typing
2025-05-31 20:41:18 -04:00
William Easton
72e999d4be
Apply suggestions from code review
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-31 15:48:43 -05:00
William Easton
cf5d0c9e95
add test for list case and lint
2025-05-31 14:49:35 -05:00
William Easton
b086dd4f32
Add content tests, fix array wrapping single objects
2025-05-31 14:39:54 -05:00
Jeremiah Lowin
010170337f
Ensure that tools/templates/prompts are compatible with callable objects
2025-05-23 18:53:55 -04:00
Jeremiah Lowin
6b4f700a59
Improve handling of exceptiongroups when raised in clients
2025-05-14 19:34:17 -04:00
Jeremiah Lowin
6fa7c1704a
Improve error handling for tools and resources
2025-05-13 14:19:55 -04:00
Jeremiah Lowin
112b91f521
create a setting for legacy parsing
2025-05-06 13:21:38 -04:00
Jeremiah Lowin
c449f1d697
Handle args/kwargs appropriately for various objects
2025-05-04 15:00:26 -04:00
Jeremiah Lowin
c63fcc96ea
Remove is_async attribute
2025-05-04 12:18:28 -04:00
Jeremiah Lowin
70598d4d7b
Update test_tool.py
2025-05-04 12:07:47 -04:00
Jeremiah Lowin
51a867c3af
Replace custom parsing with TypeAdapter
2025-05-04 12:07:00 -04:00