Session Message
When MCP servers and clients communicate, Metorial captures the messages they send. This allows you to see the raw messages exchanged between the server and client, which can be useful for debugging or understanding the communication flow.
Session Message object
Attributes
object
Stringid
StringUnique identifier for the session message
type
EnumType of the session message
sender
ObjectInformation about the sender of the message
mcp_message
ObjectDetails of the MCP message
session_id
StringIdentifier for the related session
server_session_id
StringIdentifier for the related server session
created_at
DateTimestamp when the message was created
{"object": "session.message","type": "request","sender": {"object": "session.message.sender","type": "client"},"mcp_message": {"object": "session.message.mcp_message","payload": {}}}
List session messages
List all messages for a specific session
URL Parameters
session_id
StringThe unique identifier for the session
Query Parameters
limit
NumberOptionalafter
StringOptionalbefore
StringOptionalcursor
StringOptionalorder
EnumOptionalserver_run_id
UnionOptionalserver_session_id
UnionOptionalcurl -X GET "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/messages" \-H "Authorization: Bearer metorial_sk_..."
Get session message
Get details of a specific session message
URL Parameters
session_id
StringThe unique identifier for the session
session_message_id
StringThe unique identifier for the session_message
curl -X GET "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/messages/ses_Rm4Mnheq2bfEPhBhP7SY" \-H "Authorization: Bearer metorial_sk_..."