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

mcp: schema_list_queries returns an array as structuredContent, and its outputSchema is invalid

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go, json
領域
api, cli

調査の方向性

Start with the schema_list_queries handler used by nais alpha mcp serve, then locate the output schemas for the other list-returning tools named in the issue. Reproduce the invalid structuredContent and outputSchema response through tools/call. The work is done when list results use an object envelope with a matching object schema, strict MCP clients accept them, and all listed tools are checked for the same inconsistency.

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

説明

nais alpha mcp serve (7.0.3) answers tools/call for schema_list_queries with structuredContent as a JSON array, for example [{"name":"__schema",...}]. MCP requires structuredContent to be an object.

The tool's outputSchema is invalid too: {"type":"object","properties":{},"items":{...}} mixes object and array.

Strict clients reject the result. OpenCode 2.1 fails with:

Invalid result for tools/call: [{ expected: "record", code: "invalid_type", ... }]

Copilot CLI accepts it.

Suggested fix: wrap the list, for example {"queries": [...]}, with a matching outputSchema: {"type":"object","properties":{"queries":{"type":"array","items":...}}}. Please also check the other tools that return lists (schema_list_types, schema_list_mutations, schema_search, schema_get_implementors, schema_get_union_types) for the same problem.

Found while running Nais MCP through the navikt/cplt broker in OpenCode. The broker passes tools/call results through unchanged.

主要言語
Go
スター
2
フォーク
5
平均マージ
3時間 3分
マージ済み PR(30日)
30

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

nais/cli のほかの issue

nais/cli の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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