# Avoid sending null "params" in MCP notification \(\#54807\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/6787fb13ad10226dfbc582341b62a7fb19a1061b)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 6787fb13ad10226dfbc582341b62a7fb19a1061b

Requested commit: 6787fb13ad10226dfbc582341b62a7fb19a1061b

Commit: 6787fb13ad10226dfbc582341b62a7fb19a1061b

Tree: ebf7e816a91aa5bc762276f89180cb0b782f2c78

Author: Adam Kocoloski

Committer: GitHub

## Message

```
Avoid sending null "params" in MCP notification (#54807)

MCP servers that strictly validate the schema will reject notification
requests with params:null. Zed needs to either send an empty object or
omit the key altogether:


https://modelcontextprotocol.io/specification/2024-11-05/basic/messages#notifications

This one-line patch omits the key, consistent with the behavior in
Request messages.

I tested it with a dev build and confirmed that our internal MCP server
now accepts Zed's "notifications/initialized" request, and Zed is
subsequently able to discover the tools provided by this server.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Release Notes:

- N/A
```

## Parents

- [29aad02404ae1c0049a2d79b841f7e0a7fdb9048](https://git.cafe/gitcafe/zed/commit/29aad02404ae1c0049a2d79b841f7e0a7fdb9048?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/6787fb13ad10226dfbc582341b62a7fb19a1061b?format=markdown)
