An MCP server can emit events that inform clients about changes in tools, resources, session state, or external conditions that may impact the model’s reasoning. These events help the model respond to updates without constantly polling the server. Common events include updates to the tool list, such as when new capabilities become available or when existing tools are temporarily disabled. The server may also emit resource change events, notifying the client when files, indexes, or collections have been added, modified, or deleted.
Event emission is also useful for long-running operations or asynchronous tasks. For example, if a vector indexing operation takes several seconds to complete, the server can emit progress updates or completion events. This prevents the model from blocking on a single request and allows it to adjust its reasoning based on real-time system state. Error events can also be emitted to inform the client when system-level issues occur, such as authentication failures or resource access errors.
For vector databases like Milvus, events can signal when a collection becomes available, when indexing operations finish, or when new embeddings have been inserted and are ready for query. These signals help the model make informed decisions about when to perform search operations or when to request fresh metadata. By emitting structured events, MCP keeps model and infrastructure state synchronized, improving the reliability of retrieval-augmented workflows and ensuring that models work with the most up-to-date information.
