Skip to content

422 Validation failed when viewing most frequent contributor #135

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

Open
bocytko opened this issue Apr 6, 2025 · 0 comments
Open

422 Validation failed when viewing most frequent contributor #135

bocytko opened this issue Apr 6, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@bocytko
Copy link

bocytko commented Apr 6, 2025

Describe the bug

Query: "Who's the most frequent contributor to github/github-mcp-server?" is translated into an invalid API call against the Github API:

Error invoking MCP tool search_users: failed to search users: GET https://api.github.com/search/users?order=desc&page=1&per_page=1&q=repo%3Agithub%2Fgithub-mcp-server&sort=repositories: 422 Validation Failed [{Resource:Search Field:q Code:invalid Message:None of the search qualifiers apply to this search type.}]

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 (b89336793c5bc9b9abdd5100d876babbc1031f5d) 2025-04-04T15:38:21Z

Steps to reproduce the behavior

  1. Agent config:
    agent = Agent(
        name="Assistant",
        instructions=f"Answer questions about Git repositories.",
        mcp_servers=[mcp_server],
    )
  1. User input: Who's the most frequent contributor to github/github-mcp-server?

Expected vs actual behavior

Context: I tried to validate if the MCP server can handle the example in https://github.com/openai/openai-agents-python/blob/main/examples/mcp/git_example/main.py#L15 that uses git_log as tool to fetch 1,000 last commits to calculate the most frequent contributor.

I would expect github-mcp-server to generate valid API calls, even if these do not yield the result expected by the user input.

Logs

Image

{
  "error": "Error invoking MCP tool search_users: failed to search users: GET https://api.github.com/search/users?order=desc&page=1&per_page=1&q=repo%3Agithub%2Fgithub-mcp-server&sort=repositories: 422 Validation Failed [{Resource:Search Field:q Code:invalid Message:None of the search qualifiers apply to this search type.}]",
  "tool_name": "search_users"
}
@bocytko bocytko added the bug Something isn't working label Apr 6, 2025
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

No branches or pull requests

1 participant