Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Response ID-value not matching request value, due to default int #961

Copy link
Copy link
@sProdz

Description

@sProdz
Issue body actions

Initial Checks

Description

When the client sends a request with id field value of type string, the server MUST respond with exactly the same value. When the #851 was accepted to version 1.9.4 it broke this standard causing errors for example in Microsoft Copilot Studio, because of the mismatch in the response id value.

"id
This member is REQUIRED.
It MUST be the same as the value of the id member in the Request Object.
If there was an error in detecting the id in the Request object (e.g. Parse error/Invalid Request), it MUST be Null.
" JSON-RPC 2.0 spec.

Example Code

curl -N \
  -X POST http://localhost:8000/mcp/ \                    
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":"1","method":"tools/list","params":{}}' # String

Response:

{
    "jsonrpc": "2.0",
    "id": 1,  # Int
    "result": {
        "tools": [
            {
                "name": "query",
                "description": "Ask an LLM agent to answer the query using internal documents",
                "inputSchema": {
                    "properties": {
                        "query": {
                            "title": "Query",
                            "type": "string"
                        }
                    },
                    "required": [
                        "query"
                    ],
                    "title": "query_toolArguments",
                    "type": "object"
                },
                "annotations": {
                    "title": "Internal Docs Query",
                    "readOnlyHint": true,
                    "destructiveHint": false,
                    "idempotentHint": true,
                    "openWorldHint": false
                }
            }
        ]
    }
}

Python & MCP Python SDK

Python 3.11
MCP Python SDK 1.9.4
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.