Session Messages
Session messages represent the MCP protocol messages exchanged during a session. This read-only resource provides visibility into the communication between clients and providers.
Session Messages object
Attributes
object
StringString representing the object's type
id
StringUnique session message identifier
type
StringMessage type
sender
ObjectMessage sender information
mcp_message
ObjectDetails of the MCP message
session_id
StringParent session ID
server_session_id
StringServer session / session provider ID
created_at
DateTimestamp when created
{"object": "session.message","id": "smg_8hJkLmNpQrStUvWx","type": "request","sender": {"object": "session.message.sender","type": "client","id": "spr_3cDeFgHjKlMnPqRs"},"mcp_message": {"object": "session.message.mcp_message","method": "tools/list","payload": {"jsonrpc": "2.0","method": "tools/list"}},"session_id": "ses_4dEfGhJkLmNpQrSt","server_session_id": "spr_3cDeFgHjKlMnPqRs","created_at": "2025-09-15T10:30:00.000Z"}
List session messages
Returns a paginated list of messages for a session.
URL Parameters
session_id
StringThe unique identifier for the session
Query Parameters
limit
NumberOptionalMaximum number of items to return (1-100)
after
StringOptionalReturn items after this ID
before
StringOptionalReturn items before this ID
cursor
StringOptionalPagination cursor from a previous response
order
EnumOptionalSort order for results
type
StringOptionalFilter by message type
session_provider_id
UnionOptionalFilter by session provider ID(s)
provider_run_id
UnionOptionalFilter by provider run ID(s)
curl -X GET "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/messages" \-H "Authorization: Bearer metorial_sk_..."
Get session message
Retrieves a specific message from a session.
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_..."