Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[MCP] MCP Inspector warns about incompatible JSON Schemas / Change type hinting for nullable type

クローズ
#8,504 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
php
領域
api

調査の方向性

まず、nullable 型の JSON Schema を生成する API Platform のコードを見つけ、issue で説明されている MCP Inspector の警告を再現します。nullable スキーマが単一の型値を持つ anyOf ブランチを使用し、null と存在しないプロパティの区別を維持できれば変更は完了です。関連する既存のチェックで生成されたスキーマを検証してください。

索引モデルが issue の本文から書いたものです。

説明

Since recently MCP Inspector warns about the produced schema type hints:

`type` is an array (["string","null"]). The array form is legal JSON Schema, but several MCP clients read `type` as a single string and either reject the tool or drop the constraint.

Fix: Split it into `anyOf` branches, each with a single `type` — `{"anyOf": [{"type": "string"}, {"type": "null"}]}`. (Making the property optional instead is a different contract: absent is not the same as `null`.)

Like the warning message says, the behavior of the API Platform here is not necessarily wrong, but changing the way how these type hints are declared might ensure wider compatibility.

主要言語
PHP
スター
2.6k
フォーク
989
平均マージ
1日 19時間
マージ済み PR(30日)
87

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

api-platform/core のほかの issue

api-platform/core の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。