mcp: validate tool names (#640)
Implement SEP 986, enforcing restrictions on tool names. Since we're already at v1 we couldn't turn this into a panic, so use an error log instead. This is consistent with the typescript SDK. A note is left in our 'rough edges' doc to panic in v2. Fixes #621
This commit is contained in:
parent
9ef2b2742e
commit
1943780255
1 changed files with 168 additions and 0 deletions
|
|
@ -9,3 +9,9 @@ v2.
|
|||
of the SDK where event persistence and delivery were combined.
|
||||
|
||||
**Workaround**: `Open` may be implemented as a no-op.
|
||||
|
||||
- Enforcing valid tool names: with
|
||||
[SEP-986](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986)
|
||||
landing after the SDK was at v1, we missed an opportunity to panic on invalid
|
||||
tool names. Instead, we have to simply produce an error log. In v2, we should
|
||||
panic.
|
||||
|
|
|
|||
Loading…
Reference in a new issue