mcp: schema_list_queries returns an array as structuredContent, and its outputSchema is invalid
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Go
- Stars
- 2
- Forks
- 5
- Avg merge
- 2h 55m
- Merged PRs (30d)
- 30
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nais/cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 56/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 57/100
Maintainers usually reply within 1 day
-
mcp: mock schema is invalid GraphQL, so schema_* tests pass on a parse errorPossibly taken @Starefossen claimed this 1 day ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
Similar issues
-
area:web p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Lets-Parley/Parley#912 ·
Maintainers usually reply within 1 day
-
enhancement help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Git-Hospital/githealthcheck#61 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
afreidah/s3-orchestrator#1824 ·
Maintainers usually reply within 1 day
-
Type: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
projectdiscovery/notify#569 ·
-
internal
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day