Is the README example Tool registration method incorrect?
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue nà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
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- swift
- Lĩnh vực
- api, documentation
Hướng nghiên cứu
Start with the README Tool registration example and compare its inputSchema with the object schema shown in the issue. Check the Swift Tool API to determine which form is accepted, then update the README example to match the working registration format and verify the documented example is consistent with the API.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Is the README example Tool registration method incorrect?
Using the example from the README, I get an error saying that the inputSchema is expected to be an object.
Example from the README:
Tool(
name: "weather",
description: "Get current weather for a location",
inputSchema: .object([
"location": .string("City name or coordinates"),
"units": .string("Units of measurement, e.g., metric, imperial")
])
)
When I try this format, I get the expected response:
Tool(
name: "weather",
description: "Get current weather for a location",
inputSchema: .object([
"type": "object",
"properties": [
"a": ["type": "number"],
"b": ["type": "number"]
],
"required": ["a", "b"]
])
)
To Reproduce
Steps to reproduce the behavior:
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
- Swift
- Star
- 1.6k
- Fork
- 270
- Merge trung bình
- 2 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
- 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/swift-sdk
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
modelcontextprotocol/swift-sdk#327 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Value decoding changes data-URL-looking JSON strings into Value.dataCó thể đã có người làm @bitbemol đã nhận 73 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
modelcontextprotocol/swift-sdk#277 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/swift-sdk#274 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
`HTTPClientTransport` fails to build on Windows: `#if !os(Linux)` guards no longer match the `EventSource` platform conditionCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
modelcontextprotocol/swift-sdk#261 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Client.withBatch leaves per-request tasks pending when transport.send throwsCó thể đã có người làm @bbdu3 đã nhận 1 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
modelcontextprotocol/swift-sdk#324 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của modelcontextprotocol/swift-sdk
Issue tương tự
-
[java] TestClassWithoutTestCases: document that abstract classes and interfaces are not checkedĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
文件夹设置bugĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
joeseesun/qiaomu-jot#14 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
30-minutes algorithm any-language beginner-friendly c community cpp csharp data-structures go good first issue hacktoberfest help wanted kotlin learning leetcode php ruby rust swift
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 85/100
Huerte/algo-solutions-python#211 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: build-and-ci S3: minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
manaflow-ai/cmux#39902 ·
Maintainer thường phản hồi trong vòng 1 ngày