McpServer#

class scikitplot.cleanprompt.McpServer(make_guard, roots, name='cleanprompt', version='1.0.0')[source]#

Answer MCP requests with cleanprompt tools.

Parameters:
make_guardcallable

Returns a fresh Guard. Called at start and again by cleanprompt_forget.

rootsiterable of path-like

Folders the tools may read and write under.

namestr, default=’cleanprompt’

The server name announced to clients.

versionstr, default=’1.0.0’

The server version announced to clients.

Parameters:

Notes

Developer notes. handle is a pure function of one message and the server’s state — no I/O — which is what makes the protocol testable without a subprocess; serve only moves lines.

close()[source]#

Drop every value held.

Return type:

None

handle(message)[source]#

Return the response to one JSON-RPC message, or None.

Parameters:
messageobject

A decoded JSON-RPC request, notification or batch.

Returns:
dict, list or None

None for a notification, or a batch of notifications.

Parameters:

message (Any)

Return type:

Any

name#

!! processed by numpydoc !!

version#

!! processed by numpydoc !!