Skip to content

git: an unknown tool called without repo_path reports "'repo_path'" instead of Unknown tool #4994

Description

@cliffhall

Problem

call_tool reads arguments["repo_path"] before dispatching on the tool name, so an unknown tool called without repo_path fails with the KeyError repr 'repo_path' instead of an "Unknown tool" error.

Where it is pinned

src/git/tests/test_protocol.py: test_unknown_tool_without_repo_path_reports_the_key_error, added in #4974 (Wave 1 of #4857). Each of these tests carries a KNOWN BUG marker: it asserts the current, wrong behavior, so the fix has to change it.

Expected

An unknown tool name returns "Unknown tool: " whatever arguments were sent.

Done when

  • The behavior above is fixed, in the legacy-era (2025-11-25) server on SDK 1.x.
  • The pinning tests assert the correct behavior, and their KNOWN BUG markers are gone.
  • The per-file 90% coverage gate still passes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingserver-gitReference implementation for the Git MCP server - src/gitv2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions