Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
Sonde::Catalog Struct Reference

What dispatch needs to know about the registries, as an immutable snapshot. More...

#include <server_p.h>

Public Attributes

QString name
 serverInfo name.
QString version
 serverInfo version.
QString instructions
 initialize instructions.
QJsonArray toolsList
 tools/list entries, by name.
QHash< QString, ToolDefinition > tools
 Definitions by name, for argument validation.
QHash< QString, AsyncToolHandler > threadSafeHandlers
 Handlers of the tools that run on the sessions' thread (see ServerPrivate::addThreadSafeTool()).
QJsonArray resourcesList
 resources/list entries, by URI.
QHash< QString, std::pair< ResourceDefinition, ResourceReader > > threadSafeResources
 The resources read on the sessions' thread (see ServerPrivate::addThreadSafeResource()).

Detailed Description

What dispatch needs to know about the registries, as an immutable snapshot.

The registries (tools, resources, instructions, server info) belong to the server's thread. Dispatch reads this snapshot instead, so that it never needs that thread: today they are the same thread, but with a worker thread for the transports (notes/design/0015-threaded-transport.md) dispatch must keep answering tools/list or initialize while the server's thread is busy. ServerPrivate::publishCatalog() builds a new one after every change.


The documentation for this struct was generated from the following file: