influxdata / influxdata/influxdb3_mcp_server
query_sql: agent naturally sends 'query' param, tool requires 'q' — causes avoidable failed call
- Dominant language
- TypeScript
- Stars
- 38
- Forks
- 14
- Avg merge
- 5d 9h
- Merged PRs (30d)
- 7
Description
## Summary
During MCP testbench e2e grading (2026-07-30, case `eff-broad-schema-cpu`, default/operator profile), Claude called `query_sql` with the query text under a `query` key instead of `q`, got a schema-validation error, then retried correctly.
## Evidence
First call (failed):
```json
{"db": "host_system", "query": "SELECT * FROM metrics ORDER BY time DESC LIMIT 1", "maxRows": 1}
```
Error:
```
MCP error -32603: [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": ["q"],
"message": "Required"
}
]
```
Second call (succeeded, same run):
```json
{"db": "host_system", "q": "SELECT * FROM metrics ORDER BY time DESC LIMIT 1", "maxRows": 1}
```
- Run: `tb-eff-broad-schema-cpu-ent-default-claude`, mcp_server_sha `00fdb733278a09f8b7677a12f6fd818b9843c2d9`
- Full context: `docs-agent/testbench/AGENT_E2E_RESULTS.claude.yaml` (docs-tooling), same test_case entry
## Impact
Not a correctness failure — the agent recovered and returned a correct, bounded final answer. But it's an avoidable extra tool call/round-trip, and a bad model prior (`query` reads as the obvious param name for a SQL query tool) means this will likely recur across agents/harnesses.
## Suggested fix
Either rename the param to `query` for clarity, or accept `query` as an alias for `q` in the `query_sql` tool schema. Also check `query_influxql` for the same naming choice.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the schema or entry point for the query_sql tool and compare its parameter handling with query_influxql. Use docs-agent/testbench/AGENT_E2E_RESULTS.claude.yaml and the reported calls as behavioral evidence; done means the intended query parameter is accepted consistently without the avoidable validation failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend-api-design
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100