Skip to content

Conversation

@davidruzicka
Copy link
Owner

Motivation

  • Fix create_content customFields mismatch by allowing object-map input and converting it to the array shape expected by YouTrack API.
  • Fix run_commands (execute_command) missing issues by accepting issue id arrays and mapping primitives to objects matching CommandList schema.
  • Prevent MCP tool validation failures by adding explicit parameter transformation rules and schema support for multi-type parameters.

Description

  • Add multi-type parameter support (ParameterDefinition.type can be a ParameterType[]) and emit oneOf JSON Schema in ToolGenerator and generated Zod schemas.
  • Introduce parameter metadata fields object_entries_to_array and array_item_to_object in src/types/profile.ts and profile-schema.json to describe object→array and array-item→object transformations.
  • Implement src/argument-normalizer.ts with normalizeArguments() and integrate it into executeSimpleTool in src/mcp-server.ts to perform the conversions at runtime.
  • Update YouTrack profile files (profiles/youtrack/profile.json and profile.test.json) and tests to accept customFields as object maps and issues arrays, and add src/argument-normalizer.test.ts plus a multi-type schema test in src/tool-generator.test.ts.

Testing

  • Ran schema generation with npm run generate-schemas which completed successfully.
  • Ran targeted unit tests with npm run test:unit -- -t "normalizeArguments|Profile Test: youtrack-optimized" and the focused tests passed.
  • Ran full unit suite and coverage via npm run coverage -- --coverage.include=src/argument-normalizer.ts which completed successfully and all unit tests passed.
  • Coverage: overall coverage reported 92.75% and src/argument-normalizer.ts file coverage reported 92.75% (with uncovered lines shown in the coverage output).

Codex Task

@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9ef7469d7d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@davidruzicka davidruzicka merged commit c161e87 into main Jan 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants