sigildocs

(sigil mcp server)

(sigil mcp server) - MCP server implementation.

Provides the main server loop, message routing, and MCP protocol handling for the Sigil MCP server.

Exports

mcp-serverprocedure

Construct a mcp-server struct.

mcp-server?procedure

Test if a value is a mcp-server struct.

Get the name field of a mcp-server struct.

Get the version field of a mcp-server struct.

Get the tools field of a mcp-server struct.

Get the resources field of a mcp-server struct.

Get the prompts field of a mcp-server struct.

Get the capabilities field of a mcp-server struct.

Get the instructions field of a mcp-server struct.

Get the initialized field of a mcp-server struct.

Set the tools field of a mcp-server struct.

Set the resources field of a mcp-server struct.

Set the prompts field of a mcp-server struct.

Set the initialized field of a mcp-server struct.

Set the initialized field of a mcp-server struct.

tool-defprocedure

Construct a tool-def struct.

tool-def?procedure

Test if a value is a tool-def struct.

tool-def-nameprocedure

Get the name field of a tool-def struct.

Get the description field of a tool-def struct.

Get the input-schema field of a tool-def struct.

Get the handler field of a tool-def struct.

Get the handler field of a tool-def struct.

resource-defprocedure

Construct a resource-def struct.

resource-def?procedure

Test if a value is a resource-def struct.

Get the uri field of a resource-def struct.

Get the name field of a resource-def struct.

Get the description field of a resource-def struct.

Get the mime-type field of a resource-def struct.

Get the handler field of a resource-def struct.

Get the handler field of a resource-def struct.

prompt-defprocedure

Construct a prompt-def struct.

prompt-def?procedure

Test if a value is a prompt-def struct.

Get the name field of a prompt-def struct.

Get the description field of a prompt-def struct.

Get the arguments field of a prompt-def struct.

Get the handler field of a prompt-def struct.

Register a tool with the server.

Register a resource with the server.

Register a prompt with the server.

Send a notification from the server to the client.

Used for server-initiated messages such as channel events. The notification is written as a JSON-RPC message to the current output port.

Examples:

(mcp-server-notify! server "notifications/claude/channel"
  params: '((content . "new message")
            (meta . ((sender . "david")))))

Handle a parsed JSON-RPC message and return a response (or #f for notifications).

(No description)