There are a few ANSI codes that the server-side can send, to request some information from the client side.

Run to see how a particular terminal responds.

query cursor position

query: <ESC>[6n
response: <ESC>[{row};{column}R

answerback / ENQ (enquire) character / W-R-U (who are you)

query: ^E
response: {stationid}

The response is usually user-configurable. For example, xterm's default response is blank, but this can be set via an .Xresources of answerbackString.

query device status

query: <ESC>[5n

query printer status

query: <ESC>[?15n

query device attributes

query: <ESC>[c or <ESC>Z