Skip to main content

Read Messages

Immutable Catalog + Curated Guide

This lossless descriptor comes from the active Portal catalog and is enhanced with reviewed examples.

READdiscord.read_messages
  • Contract tier: agent_ready
  • Risk: read
  • Catalog version: discord-2026.07.12.3
  • Descriptor hash: 43eb4a4055ea74be6b06ba07ef30cace3ba4c619d35f8f657d493b0324a1123d

Read channel history slices for context and moderation triage.

Request Body

{
"jsonrpc": "2.0",
"id": "discord-read-messages-example",
"method": "tools/call",
"params": {
"name": "discord.read_messages",
"arguments": {
"channel_id": "123456789",
"count": 20
}
}
}

Arguments Schema

{
"type": "object",
"title": "read_messages input",
"properties": {
"count": {
"type": "string",
"title": "Count",
"default": "",
"description": "Maximum records to return as a positive decimal string within the tool's limit."
},
"channel_id": {
"type": "string",
"title": "Channel Id",
"default": "",
"description": "Discord channel snowflake; empty uses the primary channel only where documented."
},
"after_message_id": {
"type": "string",
"title": "After Message Id",
"default": "",
"description": "Optional Discord message snowflake; return records created after it."
},
"before_message_id": {
"type": "string",
"title": "Before Message Id",
"default": "",
"description": "Optional Discord message snowflake; return records created before it."
}
},
"description": "Validated input for the Discord MCP read_messages tool."
}

Output Schema

{
"oneOf": [
{
"type": "object",
"required": [
"ok",
"data",
"meta"
],
"properties": {
"ok": {
"const": true
},
"data": {
"type": "object",
"properties": {
"count": {
"type": [
"integer",
"null"
],
"description": "Provider data field count returned by read_messages."
},
"messages": {
"type": "array",
"items": {},
"description": "Provider data field messages returned by read_messages."
},
"channel_id": {
"type": [
"string",
"null"
],
"description": "Provider data field channel_id returned by read_messages."
},
"after_message_id": {
"type": [
"string",
"null"
],
"description": "Provider data field after_message_id returned by read_messages."
},
"before_message_id": {
"type": [
"string",
"null"
],
"description": "Provider data field before_message_id returned by read_messages."
}
},
"description": "message IDs, authors, timestamps, content, embeds, attachments, reactions, and pagination context",
"additionalProperties": true
},
"meta": {
"type": "object",
"required": [
"duration_ms",
"rate_limit",
"warnings"
],
"properties": {
"guild_id": {
"type": "string"
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"thread_id": {
"type": "string"
},
"channel_id": {
"type": "string"
},
"rate_limit": {
"type": "object",
"additionalProperties": true
},
"request_id": {
"type": "string"
},
"duration_ms": {
"type": "integer",
"minimum": 0
}
},
"description": "Safe execution metadata containing no credentials or raw headers.",
"additionalProperties": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"ok",
"error",
"meta"
],
"properties": {
"ok": {
"const": false
},
"meta": {
"type": "object",
"required": [
"duration_ms",
"rate_limit",
"warnings"
],
"properties": {
"guild_id": {
"type": "string"
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"thread_id": {
"type": "string"
},
"channel_id": {
"type": "string"
},
"rate_limit": {
"type": "object",
"additionalProperties": true
},
"request_id": {
"type": "string"
},
"duration_ms": {
"type": "integer",
"minimum": 0
}
},
"description": "Safe execution metadata containing no credentials or raw headers.",
"additionalProperties": true
},
"error": {
"type": "object",
"required": [
"type",
"message"
],
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
},
"diagnostics": {
"type": "object",
"additionalProperties": true
},
"required_perms": {
"type": "array",
"items": {
"type": "string"
}
},
"discord_error_code": {
"type": "integer"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
],
"title": "Discord MCP provider result",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Normalized success or semantic-error response; ok=false is a failed call."
}

Code Examples

curl -X POST 'https://portal.madpanda3d.com/api/mcp' \
-H 'Authorization: Bearer mad_live_***' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "discord-read-messages-example",
"method": "tools/call",
"params": {
"name": "discord.read_messages",
"arguments": {
"channel_id": "123456789",
"count": 20
}
}
}'

Example Responses

{
"ok": true,
"messages": [
{
"id": "msg_1",
"author": "moderator",
"content": "Please keep discussion in #support"
}
]
}