llmcpp-json-rpc
Table of Contents
JSON-RPC (llmcpp)
JSON-RPC identifies requests and their replies. An external agent can call the compiler's get_task tool using this JSON-RPC 2.0 message:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_task",
"arguments": {}
}
}
The method selects an MCP operation; its parameters select the compiler tool. The response carries the same id, allowing the agent to match it to this request. The actual stream carries each message as one line; the example is expanded for readability.
The separate llm/generate request asks the agent to implement a target. Tool requests can occur while that request remains active. Notifications, such as initialization completion, omit the request identifier because they do not expect a reply.
llmcpp-json-rpc.md · Last modified: by 127.0.0.1
