Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#817 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Starefossen is already working on this.

Since Oct 28, 2026.

  • #820 by @Starefossen — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go, json
Domain
api, cli

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nais/cli

All issues in nais/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.