Commit 6f95028
committed
Review nits: Annotated recursion looks at the type only; drop Iterable from content origins; prompt() docstring
- Annotated[X, meta...]: only X is a type, so recurse into it alone (and cover the
nested-Annotated shape with a test).
- Iterable[...] values are typically generators, which _convert_to_content does not
unroll, so the annotation no longer counts as content; Sequence stays because its
runtime value is a list or tuple.
- @mcp.prompt() docstring lists the bare content forms render() now accepts.1 parent 2251112 commit 6f95028
3 files changed
Lines changed: 13 additions & 5 deletions
File tree
- src/mcp/server/mcpserver
- utilities
- tests/server/mcpserver
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
918 | 918 | | |
919 | 919 | | |
920 | 920 | | |
921 | | - | |
922 | | - | |
| 921 | + | |
| 922 | + | |
923 | 923 | | |
924 | 924 | | |
925 | 925 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
871 | 871 | | |
872 | 872 | | |
873 | 873 | | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
874 | 878 | | |
875 | 879 | | |
876 | 880 | | |
| |||
882 | 886 | | |
883 | 887 | | |
884 | 888 | | |
| 889 | + | |
885 | 890 | | |
886 | 891 | | |
887 | 892 | | |
| |||
0 commit comments