microsoft / microsoft/vscode-mssql

[GitHub Copilot - Bug | Feature request]: Copilot Chat fails MSSQL-assisted query analysis when mssql_schema_designer tool validation rejects top-level oneOf

Open
#21,770 3 comments 1 reaction 1 assignee Claimed by @caohai View on GitHub
Area - GitHub Copilot Bug Enhancement
Dominant language
TypeScript
Stars
1.9k
Forks
610
Avg merge
2d 3h
Merged PRs (30d)
97

Description

### Description

## Summary

Copilot Chat fails to complete MSSQL-assisted query analysis because the MSSQL tool contract appears to be rejected during validation. The user-facing error is generic, but the Copilot Chat log shows:

> Tool mssql_schema_designer failed validation: object has unsupported top-level schema keyword 'oneOf'

As a result, Copilot does not reach actual SQL execution or plan analysis.

**Actual result**

- Copilot Chat returns a generic failure message such as:
- `All tool calls failed or timed out.`
- The Copilot Chat log shows warnings like:
- `Tool mssql_schema_designer failed validation: object has unsupported top-level schema keyword 'oneOf'`
- No evidence appears in the MSSQL notebook log that the query or plan analysis actually ran.

**Expected result**

- Copilot Chat should successfully use the MSSQL integration to inspect the connected SQL context and analyze the query, or
- If the tool definition is invalid or unsupported, Copilot Chat should return a specific actionable error instead of a generic timeout/tool-failure message.

## Additional Context

- This does not appear to be a SQL query problem.
- The model requests themselves were succeeding around the same time, which suggests the failure happened in tool orchestration rather than model availability.
- The warning about `mssql_schema_designer` validation was repeated multiple times in the same session, suggesting a persistent compatibility issue rather than a one-off failure.
- The MSSQL extension log for the relevant window did not show actual execution activity, which suggests the request failed before reaching SQL execution.

## Suspected Cause

A compatibility issue between Copilot Chat and the MSSQL extension tool schema. Specifically, the tool definition seems to include a top-level `oneOf` that the current validator rejects.

## Impact

This blocks Copilot from doing connected SQL analysis workflows and makes the failure difficult to diagnose because the user only sees a generic error.

### Log Evidence

**User-facing error**
- `All tool calls failed or timed out`

**Copilot Chat log excerpt**
```text
2026-03-27 11:21:30.774 [warning] Tool mssql_schema_designer failed validation: object has unsupported top-level schema keyword 'oneOf'
2026-03-27 11:21:55.387 [info] ccreq:0325b9df.copilotmd | success | gpt-5.4 -> gpt-5.4-2026-03-05 | 24612ms | [panel/editAgent]
2026-03-27 11:21:56.095 [warning] Tool mssql_schema_designer failed validation: object has unsupported top-level schema keyword 'oneOf'
2026-03-27 11:22:04.358 [info] ccreq:e1a0b106.copilotmd | success | gpt-5.4 -> gpt-5.4-2026-03-05 | 8262ms | [panel/editAgent]
2026-03-27 11:22:04.824 [warning] Tool mssql_schema_designer failed validation: object has unsupported top-level schema keyword 'oneOf'
2026-03-27 11:22:04.909 [info] message 0 returned. finish reason: [stop]
2026-03-27 11:22:04.917 [info] request done: requestId: [redacted] model deployment ID: []
```

Extension version: 1.41.0
VS Code version: Code 1.113.0 (cfbea10c5ffb233ea9177d34726e6056e89913dc, 2026-03-24T15:07:18+01:00)
OS version: Windows_NT x64 10.0.26200
Modes:

System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (12 x 2592)|
|GPU Status|2d_canvas: enabled
GPU0: VENDOR= 0x8086, DEVICE=0x9bc4 [Intel(R) UHD Graphics], DRIVER_VENDOR=Intel, DRIVER_VERSION=31.0.101.2137 *ACTIVE*
GPU1: VENDOR= 0x10de, DEVICE=0x1fb9 [NVIDIA Quadro T1000], DRIVER_VERSION=32.0.15.8195
GPU2: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.7309
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off|
|Load (avg)|undefined|
|Memory (System)|63.75GB (39.50GB free)|
|Process Argv|--log vscode.git=info --crash-reporter-id 5c37bb65-ffd8-421f-810d-67e3c6213544|
|Screen Reader|no|
|VM|0%|

A/B Experiments

```
vsliv368cf:30146710
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
4f60g487:31327383
6abeh943:31336334
envsdeactivate2:31464701
cloudbuttont:31379625
aihoversummaries_f:31469309
3efgi100_wstrepl:31403338
use-responses-api:31390855
defaultusage:31403421
ddidt:31399633
je187915:31401257
ec5jj548:31422691
cp_cls_c_966_ss:31454199
4je02754:31466945
8hhj4413:31478653
ge8j1254_inline_auto_hint_haiku:31431912
38bie571_auto:31478677
cp_cls_t_1081:31454832
ia-use-proxy-models-svc:31452481
core-renderer-profiling-on:31440367
e9c30283:31461165
test_control1:31471004
control_6dc23131:31467998
idci7584:31464702
showingstats:31481873
534a6447:31478749
nes-extended-on:31455476
chat:31457767
8hig5102:31480529
67jbj424:31484169
bg_compact_t:31481650
c-off:31484755
cpptoolson-v2:31475363
db0gd219:31481871
h08i8180_copy:31475368
ec1eg703:31484515
client_tst_c:31484206
po_ctrl:31483951
ddid_t:31478206
jah3f675:31483605
nes-perm-reb-0:31481661

```

### Steps to Reproduce

## Steps to Reproduce

1. Open VS Code with GitHub Copilot Chat and the MSSQL extension installed.
2. Connect to a SQL Server database in the MSSQL extension.
3. Open a SQL query in an editor tab.
4. Ask Copilot Chat to analyze the query performance in detail, including execution plan summary, bottlenecks, and optimization suggestions.
5. Wait for the response.

### Affected Area

- [x] Agent mode
- [ ] Ask mode
- [ ] Slash commands
- [ ] Code generation
- [ ] Connection management
- [ ] Schema exploration and object management
- [x] Query execution and performance advisor
- [ ] Other (please describe below)

### If you selected "Other", please describe the affected area

_No response_

### Environment Information (Optional)

## Environment

- VS Code: 1.113.0
- GitHub Copilot Chat: 0.41.2
- MSSQL extension: 1.41.0
- OS: Windows
- Copilot model used in the affected request: GPT-5.4
- Connected SQL Server context was available when the failure occurred

### Confirmation

- [x] I have searched existing issues and couldn’t find a match
- [ ] I want to work on this issue

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.