Skip to content

add(tools): tools list update notifications and connection name derived from domain - #11

Merged
Seiger merged 2 commits into
evolution-cms:mainfrom
elcreator:add-tools-list-updates
Nov 25, 2026
Merged

Seiger merged 2 commits into
evolution-cms:mainfrom
elcreator:add-tools-list-updates

Conversation

@elcreator

Copy link
Copy Markdown
Collaborator

Tool catalog updates

Authenticated Streamable HTTP sessions advertise tools.listChanged by default. After a successful first page of tools/list, eMCP remembers the revision of the full catalog visible to that session, including extra tools. Composer and published config timestamps and the visible tool identities are checked on subsequent eligible calls. When those signals change, eMCP hashes the catalog to verify that the tools or their definitions changed.

A subsequent tools/call accepting text/event-stream can carry notifications/tools/list_changed before its regular JSON-RPC reply. The client can refresh by requesting tools/list again from the first page. This protocol notification works with stream.enabled=false. JSON-only clients and internal executions continue to receive JSON.

Set tool_catalog.notify_changes=false in the published eMCP settings to disable this behavior. Session state expires after 24 hours and lives under Evo storage in emcp/tool-catalog so a routine application cache clear preserves it. Deployments serving a session across multiple web nodes need shared storage for this directory.

@elcreator
elcreator requested review from Dmi3yy and Seiger November 25, 2026 02:14

Seiger commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Thanks, Artur. Could you address the catalog-state cleanup before enabling notifications by default?

ToolListNotifications::register() writes a per-session record to a dedicated FileStore. The 24-hour TTL stops expired records from being used, but it does not remove records for sessions that never return. Please use a store that automatically removes expired entries, or add bounded cleanup for this directory. Add a regression test that verifies stale records are removed without a request for the original session and that live records are preserved.

One other behavior worth defining: the revision fast path only checks the watched files and tool identities, so an extra tool whose schema changes while those inputs stay the same won't send a notification. Please either give extra tools a way to signal definition changes and cover it in the HTTP test, or document that limitation explicitly.

SokilAI

@elcreator

Copy link
Copy Markdown
Collaborator Author

Both addressed in fb41585. Every new session now runs a bounded cleanup of emcp/tool-catalog: it removes records untouched for 25 hours and visits at most 500 entries per run. A regression test covers stale and live records without a request for the original session. Extra tools can implement HasDefinitionRevision to signal definition changes. The HTTP test covers a schema-only change, and DOCS/SPEC state that unsignalled changes send no notification.

@Seiger
Seiger merged commit 3d09019 into evolution-cms:main Nov 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants