Skip to content

intelligence_extract_entities

Intelligence Read only

Pull structured entities (decisions, action items, dates, mentions, URLs, code) from recent Discord messages using the client’s LLM.

post-meeting recap, audit log of decisions, weekly digest builder.

{
"name": "intelligence_extract_entities",
"arguments": {
"channel_id": "123456789012345678"
}
}
FieldTypeRequiredConstraintsDescription
channel_idstringyespattern: ^\d{17,20}$Channel to scan
limitintegernodefault: 50; min: 5; max: 100Messages to scan (5-100, default 50)
entity_typesarray<“user_mention” | “channel_ref” | “date” | “decision” | “action_item” | “url” | “code_snippet”>nodefault: ["decision","action_item"]; min items: 1Entity types to extract
Complete input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"channel_id": {
"type": "string",
"pattern": "^\\d{17,20}$",
"description": "Channel to scan"
},
"limit": {
"default": 50,
"description": "Messages to scan (5-100, default 50)",
"type": "integer",
"minimum": 5,
"maximum": 100
},
"entity_types": {
"default": [
"decision",
"action_item"
],
"description": "Entity types to extract",
"minItems": 1,
"type": "array",
"items": {
"type": "string",
"enum": [
"user_mention",
"channel_ref",
"date",
"decision",
"action_item",
"url",
"code_snippet"
]
}
}
},
"required": [
"channel_id"
]
}

{entities:[{type, value, source_message_id?, context?}], count, sampling_used}.

{
"entities": [
{
"type": "action_item",
"value": "Verify the rollout"
}
],
"count": 1,
"sampling_used": true
}
FieldTypeRequiredConstraintsDescription
entitiesarray<object>no
countnumberno
sampling_usedbooleanno
raw_messagesarray<object>no
entity_typesarray<string>no
channel_idstringno
_metaobjectnoPresent ONLY when the client lacks the sampling capability. When present, the analysed fields are absent and the raw Discord payload is returned instead for the host model to process.
Complete output JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"entities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"value": {
"type": "string"
},
"source_message_id": {
"type": "string",
"pattern": "^\\d{17,20}$",
"description": "Discord message ID"
},
"context": {
"type": "string"
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
}
},
"count": {
"type": "number"
},
"sampling_used": {
"type": "boolean"
},
"raw_messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"author": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"id",
"author",
"content"
],
"additionalProperties": false
}
},
"entity_types": {
"type": "array",
"items": {
"type": "string"
}
},
"channel_id": {
"type": "string"
},
"_meta": {
"description": "Present ONLY when the client lacks the sampling capability. When present, the analysed fields are absent and the raw Discord payload is returned instead for the host model to process.",
"type": "object",
"properties": {
"fallback": {
"type": "string",
"const": "host_llm_should_process"
},
"intent": {
"type": "string"
},
"sampling_used": {
"type": "boolean",
"const": false
}
},
"required": [
"fallback",
"intent",
"sampling_used"
],
"additionalProperties": false
}
},
"additionalProperties": false
}
PropertyValue
Read-onlyyes
Destructiveno
Idempotentyes
Open-worldyes
Confirmation requiredno
  • The intelligence category must be enabled by MCP_CATEGORIES when an allowlist is set.
  • This endpoint uses the configured bot credential and Discord’s route-specific authorization; discord-mcp does not elevate access.
  • An invalid credential returns a 401-class tool error. Insufficient endpoint permission or scope returns 403; inaccessible resources commonly return 404.

Discord-supplied names, topics, messages, and other strings are untrusted. Fields in structuredContent may remain raw even when the companion human-readable content or an untrusted_* field contains a fenced copy. Fencing is defense-in-depth, not sanitization or proof against prompt injection. Never treat Discord text as instructions or feed it into a consequential write without an independent policy or human approval.

packages/mcp-core/src/tools/intelligence/extract_entities.ts