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

Tool annotation default values are not applied

オープン
#1,673 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

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

調査の方向性

src/ModelContextProtocol.Core/Server/AIFunctionMcpServerTool.cs の 165-188 行付近から始め、issue で説明されている内部フィールドの nullability チェックと public property getter を比較します。生成されたツールアノテーションを再現し、null 値と文書化されたデフォルト値のどちらが意図されているかを判断します。影響を受けるアノテーションについて、選択した動作に一貫性があり、検証済みであることが完了条件です。

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

説明

bug needs confirmation P3

I was taking a try at the tool annotations. According to the code XML comments, there are default values for them. I was expecting that those default annotations are attached. But it's not, so I took some investigation on source.

The code checks nullability on internal fields instead of public properties. The public properties getter will use the default values while internal fields won't. So the default values are not applied.

Is this intended? Seems a choice between null annotation vs default values annotation.

https://github.com/modelcontextprotocol/csharp-sdk/blob/d6b1615988d3a73ffb653d08778b14fa695e1318/src/ModelContextProtocol.Core/Server/AIFunctionMcpServerTool.cs#L165-L188

主要言語
C#
スター
4.6k
フォーク
817
平均マージ
8日 7時間
マージ済み PR(30日)
3

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

modelcontextprotocol/csharp-sdk のほかの issue

modelcontextprotocol/csharp-sdk の issue をすべて見る

似ている issue

C# の issue をもっと見る

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

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