You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DAB already advertises the logging capability in its initialize response (see line 189), but the server's request dispatch loop has no handler for "logging/setLevel", so the client gets a JSON-RPC Method not found (-32601) error back.
What?
We get the error
Method not found: logging/setLevelwhen our MCP Server (STDIO) starts.Incoming request to our MCP
{ "jsonrpc": "2.0", "id": 1, "method": "logging/setLevel", "params": { "level": "info" } }The problem
DAB already advertises the logging capability in its initialize response (see line 189), but the server's request dispatch loop has no handler for "logging/setLevel", so the client gets a JSON-RPC Method not found (-32601) error back.
data-api-builder/src/Azure.DataApiBuilder.Mcp/Core/McpStdioServer.cs
Lines 188 to 199 in 9563a20
The solution
--LogLevel— takes highest precedence (IsCliOverriddenflag inDynamicLogLevelProvider`)runtime.host.logging.level— second precedencelogging/setLevel— lowest precedence, should only apply if CLI didn't overrideThen, add a case in the switch and route it through the existing
DynamicLogLevelProvider.Note
If
IsCliOverriddenis true, accept the request but silently ignore it — the client shouldn't get an error, but CLI wins.Why?
This is the mcp.json file in the
/.vscodefolder.{ "servers": { "dab-todo-test-mcp": { "type": "stdio", "command": "dab", "args": [ "start", "--mcp-stdio", "role:anonymous", "--LogLevel", "none", "--config", "${workspaceFolder}/dab-config.json" ] } }, "inputs": [] }When starting the MCP Server, the client passes in:
But we do not support it, so we get: