Skip to content

Nil values for optional arrays returns error #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
A-Georgiou opened this issue Apr 9, 2025 · 1 comment · Fixed by #194
Closed

Nil values for optional arrays returns error #193

A-Georgiou opened this issue Apr 9, 2025 · 1 comment · Fixed by #194
Assignees
Labels
bug Something isn't working

Comments

@A-Georgiou
Copy link
Contributor

Describe the bug

A clear and concise description of what the bug is.

When attempting to use the MCP tools in Claude, experimenting with the create_issue tool, I found that optional arrays are passed in as 'nil'. This is not handled currently by server.go

Example Error:

{
  `body`: `This is a test issue created via Claude to verify GitHub API functionality. Feel free to close it when no longer needed.`,
  `repo`: `SmartDNN`,
  `owner`: `A-Georgiou`,
  `title`: `Test Issue`
}
Error executing code: MCP error -32603: failed to create issue: POST https://api.github.com/repos/A-Georgiou/SmartDNN/issues: 422 Invalid request.

For 'properties/assignees', nil is not an array.
For 'properties/labels', nil is not an array. []

Affected version

Please run docker run -i --rm ghcr.io/github/github-mcp-server ./github-mcp-server --version and paste the output below

server version v0.1.0-rc.1 (87d4407d1c3dd12eacf9f134534f44d016fd363c) 2025-04-03T21:37:05Z

Steps to reproduce the behavior

  1. Query the Claude MCP to create a simple test issue on a local repo

Expected vs actual behavior

A clear and concise description of what you expected to happen and what actually happened.

Expected: The MCP tool to create an issue on the respective repo
Actual: The tool call fails and the LLM attempts to recover by repeatedly calling with different parameters

@A-Georgiou
Copy link
Contributor Author

This issue might have been caused by this change to switch from strings with comma separated lists to using an actual array: #82

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant