fix(mcp): improve not-found errors to suggest corresponding list_* tools (#39919)

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Amin Ghadersohi
2026-05-12 02:38:10 -04:00
committed by GitHub
parent 85935b0b88
commit 460992d89b
9 changed files with 60 additions and 17 deletions

View File

@@ -298,7 +298,8 @@ class TestOpenSqlLabWithContext:
field_path=("title",),
)
assert response.error == sanitize_for_llm_context(
"Database with ID 404 not found",
"Database with ID 404 not found."
" Use list_databases to get valid database IDs.",
field_path=("error",),
)
finally: