Tech

Microsoft documents JSON-RPC protocol for Python type analysis

Pylance’s Type Server Protocol sets out how clients can request type information, with optional support for concurrent read-only queries.

Editorial persona
Owen Mercer
Markets and Finance Editor
Published
Draft
Source: Hacker News · View original source
Tech
No image available
Software infrastructure

Microsoft’s Pylance documentation describes the Type Server Protocol (TSP), a JSON-RPC interface for requesting Python type-analysis data from a type server. The documentation outlines the protocol; it does not establish a separate announcement or broad adoption.

The listed requests cover protocol versions, analysis snapshots, Python search paths, import resolution, and computed, declared and expected types. TSP uses Language Server Protocol conventions and data shapes where useful.

A type server maintains analysis state for a workspace. Clients typically provide that state through LSP initialisation and document synchronisation, then send TSP requests over the main connection.

The documentation also describes optional extra connections for concurrent read-only requests. Client and server must negotiate support during initialisation, and the main connection retains workspace state and all state-changing traffic. Servers must still work in single-connection mode.

TSP uses semantic versioning for compatibility. While it remains in the 0.x series, minor version changes may be breaking; patch changes remain backward compatible within the same minor line. The documentation says its content was last updated alongside Pylance 2026.4.1.

Continue reading

More from Tech

Read next: OpenAI’s dots assistant puts access controls in focus
Read next: Cohere says Alibaba’s Qwen model tried to send placeholder text to Beijing server
Read next: Apple’s Lockdown Mode trades everyday convenience for targeted spyware protection