-
Notifications
You must be signed in to change notification settings - Fork 633
feat: parse JSON additional_fields (#1) #629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
* feat: parse additional_fields as JSON string Allow create_issue to accept dict or JSON string. Added test and docs.
This pull request has been automatically marked as stale because it has not had recent activity for 14 days. It will be closed if no further activity occurs. Please leave a comment or remove the 'stale' label if you believe this PR is still relevant. Thank you for your contributions! |
Up. |
Works well!! Lets move this up 👍🏻 |
This pull request has been automatically marked as stale because it has not had recent activity for 14 days. It will be closed if no further activity occurs. Please leave a comment or remove the 'stale' label if you believe this PR is still relevant. Thank you for your contributions! |
@sooperset check this please |
please yes - this fixes create_issue. Still issues with update_issue though. Would it be possible to include that fix? I will work on it and make a new PR crediting @4erdenko for this work. |
This pull request has been automatically marked as stale because it has not had recent activity for 14 days. It will be closed if no further activity occurs. Please leave a comment or remove the 'stale' label if you believe this PR is still relevant. Thank you for your contributions! |
PR Title
Summary
This patch lets the Jira FastMCP server accept
additional_fields
when it is passed either as a nativedict
or as a JSON‑encodedstr
. It removes validation failures that occurred when XML‑to‑JSON converters wrapped the object in quotes.Rationale
External clients (e.g. Anthropic Claude, Cursor) often emit tool calls in an XML‑like format. During XML → JSON‑RPC conversion, a nested JSON object is injected as a plain string:
Pydantic rejected this with
dict_type
. Accepting the string and parsing it server‑side solves the problem without breaking existing callers that already send a dict.Technical Details
additional_fields
type hint updated todict[str, Any] | str | None
.json.loads
; rejects invalid JSON or values that are not objects.Code excerpt:
Tests
test_create_issue_additional_fields_str_ok
– JSON string accepted, issue created.test_create_issue_additional_fields_str_invalid
– invalid JSON string returns clearValueError
.Backward Compatibility
Documentation
create_issue
updated.Related Issues
Fixes: #