Basil Hosmer
6079cd8307
- add new tool() api and tests
...
- fix schema validation
- comment headers on tests
2025-05-15 10:03:02 -04:00
Basil Hosmer
9686fc2ead
formatting, more version rollbacks
2025-05-15 10:02:03 -04:00
Basil Hosmer
bb28098d81
feat: add server-side support for tool outputSchema with backward compatibility
...
- Update McpServer to support registering tools with outputSchema
- Add automatic content generation from structuredContent for backward compatibility
- Add validation to ensure proper usage of structuredContent vs content
- Add comprehensive tests for outputSchema functionality
- Add example servers demonstrating structured output usage
- Update existing test to match new backward compatibility behavior
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-15 10:02:02 -04:00
Basil Hosmer
a85fee407a
Add support for outputSchema and optional content fields in tools
...
- Add outputSchema field to Tool type and RegisteredTool interface
- Make content field optional in CallToolResult
- Update ListToolsRequestSchema handler to include outputSchema in tool list responses
- Add support for structuredContent in tool results
- Update examples to handle optional content field
- Add tests for new outputSchema and structuredContent functionality
- Update ToolCallback documentation to clarify when to use structuredContent vs content
This change enables tools to define structured output schemas and return
structured JSON content, providing better type safety and validation for
tool outputs.
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-15 09:58:40 -04:00
ihrpr
9db5b8363c
fix sse examples
2025-04-23 22:32:56 +01:00
Basil Hosmer
e53608ea19
rebase and address comments
2025-04-22 16:37:16 -04:00
Basil Hosmer
c5e81adcd8
Fix example to properly position tool annotations
2025-04-22 15:24:38 -04:00
Basil Hosmer
0096be432f
Add ToolAnnotations support to McpServer.tool() method
2025-04-22 15:24:32 -04:00
Justin Spahr-Summers
21f492f531
Revert "Merge pull request #334 from m-paternostro/mp/notifier"
...
This reverts commit 3ef902328a , reversing
changes made to 5b6d35eb12 .
2025-04-22 11:35:49 +01:00
ihrpr
6050aa9f05
lint
2025-04-21 15:31:38 +01:00
ihrpr
eeda5d630a
readme update
2025-04-21 15:13:25 +01:00
ihrpr
39f7fdf050
fix stateless example
2025-04-21 14:41:12 +01:00
ihrpr
70608b5876
Add more test clients
2025-04-21 11:54:10 +01:00
Marcelo Paternostro
112eed999c
example and more documentation
2025-04-18 10:08:36 -04:00
ihrpr
ea04be4cf8
fix build
2025-04-18 11:52:51 +01:00
ihrpr
0bf8b376df
examples for stateless servers
2025-04-18 11:46:17 +01:00
ihrpr
64653f54bd
Merge pull request #351 from modelcontextprotocol/ihrpr/clean-up-examples
...
StreamableHttp - Update examples and README
2025-04-17 18:32:20 +01:00
ihrpr
f10d1ff93f
change sessionIdGenerator to be either undefined or generate a string
2025-04-17 18:22:11 +01:00
ihrpr
29ae6b8e49
appying suggested changes
2025-04-17 17:43:14 +01:00
ihrpr
8806c0ecb4
examples readme improvements
2025-04-16 17:49:22 +01:00
ihrpr
16df308d4f
remove logs how to ititialize with curl - not needed anymore as we have client
2025-04-16 14:51:09 +01:00
ihrpr
c3f08567a2
share implementation of in memory store between examples and integration tests
2025-04-16 14:48:47 +01:00
ihrpr
7341c9a288
fix lint
2025-04-16 14:44:45 +01:00
ihrpr
80b0bab08b
backwards compatible client
2025-04-16 14:20:55 +01:00
ihrpr
8328cfe327
example of sse server
2025-04-16 13:36:37 +01:00
ihrpr
4d2968cec3
backward compatible server example
2025-04-16 13:30:00 +01:00
ihrpr
c053c2e97d
handle session termination
2025-04-16 11:56:28 +01:00
ihrpr
585dc06708
introduce onsessioninitialized to avoid race conditions
2025-04-16 11:09:47 +01:00
ihrpr
31f44e0b68
add isInitializeRequest and isInitializedNotification utility
2025-04-16 10:19:46 +01:00
ihrpr
f1e6acb17d
resumed tool to return value
2025-04-15 16:37:31 +01:00
ihrpr
1359e9fe6a
pull transport send options into own named type
2025-04-15 11:42:16 +01:00
ihrpr
621e65c42b
Merge branch 'resumability' into ihrpr/resume-long-running-requests
2025-04-15 11:14:39 +01:00
ihrpr
67a4595ae7
improve event store interface
2025-04-15 11:03:44 +01:00
ihrpr
43cb015844
resume long running requst from new client
2025-04-13 21:40:15 +01:00
ihrpr
663b68a733
exc to disconnect in example client
2025-04-13 16:16:14 +01:00
ihrpr
6374f43390
limit on retries
2025-04-13 15:18:52 +01:00
ihrpr
3bd28829a5
examples
2025-04-13 08:28:09 +01:00
ihrpr
2c2cf5b4a2
cleam up example client
2025-04-11 14:15:43 +01:00
ihrpr
18e4981bd3
move get sse stream from a separate method to automatic connection when notifications/initialized received
2025-04-11 14:06:51 +01:00
ihrpr
e3b4496579
clean up and small fixes to comments
2025-04-11 10:42:41 +01:00
ihrpr
5730f3e92a
fixes in README
2025-04-11 10:19:09 +01:00
ihrpr
5c5a33021c
add GET to examples servers
2025-04-10 15:28:39 +01:00
ihrpr
755534ee1a
clean up examples README
2025-04-10 14:41:48 +01:00
ihrpr
0c1a4f22be
add get sse to README
2025-04-10 14:34:28 +01:00
ihrpr
111586c523
support sse though get
2025-04-10 14:23:34 +01:00
ihrpr
962a9c959a
clean up and docs fixes
2025-04-10 13:01:09 +01:00
ihrpr
71aeb9a3a6
add examples with notifications
2025-04-09 21:38:57 +01:00
ihrpr
b37a2e11ab
support for server returning json -- not stream
2025-04-09 21:01:35 +01:00
ihrpr
161b8da3e0
fix lint and rename
2025-04-08 16:16:51 +01:00
ihrpr
6c6df5e011
improve readme
2025-04-08 15:34:27 +01:00