mcp: schema_list_queries returns an array as structuredContent, and its outputSchema is invalid
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nais/cli のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
nebari-dev/nebi#630 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
router-for-me/CLIProxyAPI#7084 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
speakeasy-api/openapi#284 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
yetone/magpie#4095 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信