Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Click any words you think contain an error. Click again to unmark.
The message has no `id`, which marks it a notification, but `tools/call` expects a response, so it needs an `id` for request-response correlation.
Think of ordering at a busy coffee shop. When you want a drink back, the barista writes a number on your cup so they can call it out when ready. That number is the `id`. This message asks the server to read a file and hand back the contents, so it definitely wants something returned. But it forgot to write a number on the cup. In JSON-RPC, a message with no number is a notification, a fire and forget shout where you expect nothing back. The server is allowed to stay silent. So the client waits forever for an answer that, by the rules, will never come. The fix is simple: write a number on the cup, like `"id": 1`.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: identify the missing id, explain request versus notification, the must reply versus must not reply contract, correlation over a multiplexed channel, and the other malformed shapes.
| Aspect | Request | Notification |
|---|---|---|
| id field | Present (integer or string) | Absent entirely |
| Server response | Must reply with same id | Must not reply |
| Use for tools/call | Correct, result is needed | Wrong, result is lost |
| Correlation | Reply matched by id | No correlation possible |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Assuming any message with a method is a request. Without an id, JSON-RPC 2.0 treats it as a notification and the server may stay silent.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.