mcp: mock schema is invalid GraphQL, so schema_* tests pass on a parse error
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Read internal/mcp/client/mock_client.go and the schema_* subtests in internal/mcp/server_test.go. First inspect the mock schema parse failure and how the tests handle tool errors. Define the missing GraphQL types and make the tests fail on tool errors; done when the schema parses and the tests verify successful tool results. An open linked pull request (#822) is already addressing this work.
Written by the indexing model from the issue text.
Description
The mock schema in internal/mcp/client/mock_client.go references about 35 types it never defines, for example TeamEnvironment, TeamConnection and Time. Parsing fails with Undefined type TeamEnvironment.
The schema_* subtests in internal/mcp/server_test.go therefore only ever receive the parse error. They still pass because they check for a substring or a non-empty result, and the error text matches. For example, schema_list_queries looks for "me", which appears in "schema".
Fix: define the missing types in the mock, and make the tests fail when a tool returns an error.
- Dominant language
- Go
- Stars
- 2
- Forks
- 5
- Avg merge
- 3h 49m
- Merged PRs (30d)
- 34
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: schema_list_queries returns an array as structuredContent, and its outputSchema is invalidPossibly taken @Starefossen claimed this 1 day ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
Similar issues
-
feat(gmail): make gmail get --format raw text output the exact message, like drafts get --format rawOpenclawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openclaw/gogcli#1276 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
enhancement ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
hiero-ledger/hiero-sdk-go#1886 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
cloudevents/sdk-go#1346 ·