Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
Automation Class Reference

The MCP server and its tools, over store. More...

#include <automation.h>

Inheritance diagram for Automation:

Public Member Functions

 Automation (NotesStore *store, Asker *asker, QObject *parent=nullptr)
 The interface over store, asking asker; not listening yet.
bool start (const QString &name)
 Starts listening on local socket name, which only this user can open.
void stop ()
 Stops listening, and disconnects every client.
bool isRunning () const
 Whether it is listening.
QString endpoint () const
 The socket's full path or pipe name, for the user's MCP client.
QList< Sonde::SessionInfo > clients () const
 The connected clients that were let in.
void disconnectClient (const QString &id)
 Disconnects client id.
void runningChanged (bool running)
 It started or stopped.
void clientsChanged ()
 A client was let in, or left.

Private Member Functions

void addTools ()
 Registers note_list, note_read, note_append and note_delete.

Private Attributes

NotesStore * m_store
 The notes.
Asker * m_asker
 Asks the user.
Sonde::Server m_server
 The MCP server.

Detailed Description

The MCP server and its tools, over store.

Only Sonde::Core: none of Sonde's built-in tools (object_set, input_click, ...), which would let a client do anything the application can. The four tools here go through NotesStore, so they get its undo, as an edit by hand does.

Member Function Documentation

◆ start()

bool Automation::start ( const QString & name)

Starts listening on local socket name, which only this user can open.

Returns
Whether it is listening.

The documentation for this class was generated from the following files: