As I was trying to add the "start session" and "end session" superlocalmemory as hooks into Claude-cli, that is, when I startup Claude console I want the session to auto start and then when I type "/quit" in Claude, I want the superlocalmemory to auto stop the session, I tried to add these actions as "hooks" to Claude.
I thought executing commands on the system itself would be a good idea for these hooks, but Claude tells me that calling "slm" with a parameter to start or close the session is not possible as these are currently only accessible via the MCP tool calls:
No close-session hook on /quit yet — that's still the open work from last session. The challenge is that
mcp__superlocalmemory__close_session can only be invoked as an MCP tool (no REST endpoint on the daemon), so a shell
hook can't call it directly; it needs to instruct Claude to call it."
This means that a roundtrip to the model in the cloud is always needed to open and close sessions, while hooks ideally can just be invoked locally.
Therefore: Does it make sense to have certain calls like these be availble directly as HTTP Endpoints instead of only via the MCP tools?
As I was trying to add the "start session" and "end session" superlocalmemory as hooks into Claude-cli, that is, when I startup Claude console I want the session to auto start and then when I type "/quit" in Claude, I want the superlocalmemory to auto stop the session, I tried to add these actions as "hooks" to Claude.
I thought executing commands on the system itself would be a good idea for these hooks, but Claude tells me that calling "slm" with a parameter to start or close the session is not possible as these are currently only accessible via the MCP tool calls:
This means that a roundtrip to the model in the cloud is always needed to open and close sessions, while hooks ideally can just be invoked locally.
Therefore: Does it make sense to have certain calls like these be availble directly as HTTP Endpoints instead of only via the MCP tools?