# _jsonrpc

URL: /milo-cli/api/milo/_jsonrpc/
Section: milo
Description: Shared JSON-RPC output helpers for mcp.py and gateway.py.

---

> For a complete page index, fetch /milo-cli/llms.txt.

Open LLM text
(/milo-cli/api/milo/_jsonrpc/index.txt)

Share with AI

Ask Claude
(https://claude.ai/new?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2F_jsonrpc%2Findex.txt)

Ask ChatGPT
(https://chatgpt.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2F_jsonrpc%2Findex.txt)

Ask Gemini
(https://gemini.google.com/app?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2F_jsonrpc%2Findex.txt)

Ask Copilot
(https://copilot.microsoft.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2F_jsonrpc%2Findex.txt)

Module

#
`_jsonrpc`

Shared JSON-RPC output helpers for mcp.py and gateway.py.

2Functions

## Functions

`_parse_request`

1

`tuple[Any, str, dict[str…`

▼

Parse and validate one JSON-RPC request line.

Returns ``(id, method, params, i…

`def _parse_request(line: str) -> tuple[Any, str, dict[str, Any], bool] | None`

Parse and validate one JSON-RPC request line.

Returns`(id, method, params, is_notification)` or `None`after writing
a JSON-RPC error response for malformed input.

##### Parameters

Name
Type
Description

`line`
`str`

##### Returns

`tuple[Any, str, dict[str, Any], bool] | None`

`_write_notification`

2

`None`

▼

Write a JSON-RPC notification (no id field, no response expected).

`def _write_notification(method: str, params: dict[str, Any]) -> None`

##### Parameters

Name
Type
Description

`method`
`str`

`params`
`dict[str, Any]`
