`McpServerTool` returns garbage `BigInteger` value
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 58/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- csharp
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Start by tracing how McpServerTool serializes a tool method's return value, then check the serialization path for BigInteger against the reported Postman output. Reproduce the Fibonacci example with a value larger than 1 and identify where the numeric result becomes an object of boolean properties. Done means the tool returns the expected integer value; the issue does not name files or tests, so locate the relevant entry point and add or run a regression test there.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
[McpServerTool, Description("Return the nth Fibonacci number.")]
public async Task<BigInteger> Fibonacci(McpServer server, RequestContext<CallToolRequestParams> context, int n)
{
_logger.LogInformation($"{nameof(Fibonacci)} called with input: {n}");
if (n < 0)
throw new ArgumentOutOfRangeException(nameof(n));
if (n <= 1)
return 1;
BigInteger a = 0, b = 1;
for (int i = 2; i <= n; i++)
{
BigInteger tmp = a + b;
a = b;
b = tmp;
}
return b;
}
Seen on Postman:
{
"_meta": {
"io.modelcontextprotocol/serverInfo": {
"name": "Web.Api",
"version": "11.0.0.0"
}
},
"content": [
{
"type": "text",
"text": "{\"isPowerOfTwo\":false,\"isZero\":false,\"isOne\":false,\"isEven\":false,\"sign\":1}"
}
]
}
Expected behavior
A clear and concise description of what you expected to happen.
Logs
If applicable, add logs to help explain your problem.
Additional context
Add any other context about the problem here.
- Ngôn ngữ chính
- C#
- Star
- 4.7k
- Fork
- 863
- Merge trung bình
- 15 giờ 29 phút
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của modelcontextprotocol/csharp-sdk
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
modelcontextprotocol/csharp-sdk#2061 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
modelcontextprotocol/csharp-sdk#2060 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Image/audio content in SamplingMessage and CreateMessageResult is base64-encoded twiceCó thể đã có người làm @atailakh đã nhận 8 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
modelcontextprotocol/csharp-sdk#2033 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docs: stateless.md says the stateful task store is "scoped per session", but Tasks are unavailable in strict Stateful modeCó thể đã có người làm @FOWEPJF255 đã nhận 7 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
modelcontextprotocol/csharp-sdk#2031 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Static resources whose URIs differ only in the fragment or user info collapse into oneCó thể đã có người làm @halter73 đã nhận 18 ngày trước. Đang mởP2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/csharp-sdk#1970 · 4 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của modelcontextprotocol/csharp-sdk
Issue tương tự
-
kronos:develop:queued priority:P0
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
nopSolutions/nopCommerce#8512 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Nimblesite/SharpLsp#641 ·
Maintainer thường phản hồi trong vòng 1 ngày