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

String

String representing the object's type

id

String

Unique session message identifier

type

String

Message type

sender

Object

Message sender information

mcp_message

Object

Details of the MCP message

session_id

String

Parent session ID

server_session_id

String

Server session / session provider ID

created_at

Date

Timestamp 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

String

The unique identifier for the session

Query Parameters

limit

NumberOptional

Maximum number of items to return (1-100)

after

StringOptional

Return items after this ID

before

StringOptional

Return items before this ID

cursor

StringOptional

Pagination cursor from a previous response

order

EnumOptional

Sort order for results

type

StringOptional

Filter by message type

session_provider_id

UnionOptional

Filter by session provider ID(s)

provider_run_id

UnionOptional

Filter by provider run ID(s)

GEThttp://api.metorial.com/sessions/:session_id/messages
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

String

The unique identifier for the session

session_message_id

String

The unique identifier for the session_message

GEThttp://api.metorial.com/sessions/:session_id/messages/:session_message_id
curl -X GET "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/messages/ses_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."