Skip to main content
Glama
OrygnsCode

Omnicord - Discord server management MCP for AI agents

Search messages

search_messages
Read-only

Search Discord server history across all channels or a named channel, including embeds and polls. Filter by author, content type, pinned state, and sort by newest or relevance.

Instructions

Search the server's message history through Discord's native search index. Covers every channel the bot can read, or one channel if you name it, and looks inside embeds and polls, not just plain text. Matching is whole-word full text, not substring, so search for words rather than fragments. Filter by author, by what a message carries (image, link, file, and so on), or by pinned state, and order by newest first or by relevance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hasNoOnly messages that carry this kind of content.
sortNoOrder by newest first (recent, the default) or best match (relevant).
guildNoGuild (server) name or ID. Omit to use the default guild.
limitNoMax results to return, 1 to 25. Default 10.
queryNoWords to look for. Whole-word full text match, not substring. Optional if you filter by author, has, or pinned instead.
authorNoOnly messages from this member (name or ID).
offsetNoSkip this many results, for paging. Default 0.
pinnedNoOnly pinned (true) or only unpinned (false) messages.
channelNoLimit to one channel by name or ID. Default: the whole server.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.3.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed12 schema fields changedv1.1.2
    • changedInput schema / properties / author / description
      Previous value: -"Only messages whose author name matches this."New value: +"Only messages from this member (name or ID)."
    • changedInput schema / properties / channel / description
      Previous value: -"Channel name or ID to search in."New value: +"Limit to one channel by name or ID. Default: the whole server."
    • addedInput schema / properties / has
      Added value: +{
      +  "description": "Only messages that carry this kind of content.",
      +  "enum": [
      +    "image",
      +    "video",
      +    "sound",
      +    "file",
      +    "sticker",
      +    "embed",
      +    "link",
      +    "poll",
      +    "snapshot"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / limit / description
      Previous value: -"Max results. Default 10."New value: +"Max results to return, 1 to 25. Default 10."
    • changedInput schema / properties / limit / maximum
      Previous value: -50New value: +25
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "Skip this many results, for paging. Default 0.",
      +  "maximum": 9975,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / pinned
      Added value: +{
      +  "description": "Only pinned (true) or only unpinned (false) messages.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / query / description
      Previous value: -"Text to look for."New value: +"Words to look for. Whole-word full text match, not substring. Optional if you filter by author, has, or pinned instead."
    • addedInput schema / properties / query / maxLength
      Added value: +1024
    • removedInput schema / properties / scan_limit
      Removed value: -{
      -  "description": "How many messages to scan before stopping. Default 300.",
      -  "maximum": 1000,
      -  "minimum": 50,
      -  "type": "integer"
      -}
    • addedInput schema / properties / sort
      Added value: +{
      +  "description": "Order by newest first (recent, the default) or best match (relevant).",
      +  "enum": [
      +    "recent",
      +    "relevant"
      +  ],
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "channel",
      -  "query"
      -]
  3. First observedv1.0.2

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already declare readOnlyHint=true, and the description adds valuable behavioral context: it covers every channel the bot can read, searches inside embeds and polls, uses whole-word full-text matching, and supports filtering by author, content type, and pinned state. It does not describe pagination or rate limits, but with the annotation covering safety, the added context is sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, front-loaded with the main action, and every sentence adds value. It covers scope, matching behavior, and available filters/sorting without fluff. It is well-structured and easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter search tool with no output schema, the description is quite thorough: it covers scope, matching semantics, filters, and ordering. However, it does not explicitly describe the return format or pagination details (offset/limit), relying on the schema for those. Since the output schema is absent, a brief note on what is returned (e.g., matching messages) would make it fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds significant meaning beyond the schema. It clarifies that query matching is whole-word not substring, that 'has' includes image/link/file examples, that sort order is 'newest first or by relevance', and that channel can be used to limit scope. These enrich the parameter understanding beyond the raw schema definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches the server's message history via Discord's native search index, using a specific verb and resource. It distinguishes from siblings like read_messages and search_members by emphasizing full-text search across history with filters. The scope (all readable channels or one named channel) is explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context on when to use: for searching message history with keyword matching, filters, and sorting. It explains the whole-word matching behavior, which guides the agent to use word searches rather than fragments. It does not explicitly name alternative tools or exclusions, but the usage context is strong enough to avoid confusion with read_messages.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools