Skip to main content
Glama
LeoPhoenixT

readNdraft IMAP MCP

by LeoPhoenixT

search_emails

Read-onlyIdempotent

Search email metadata across mailboxes with filters for sender, subject, date, and read status, supporting paged results for up to 500 rows.

Instructions

Search 1-500 metadata rows in stable mailbox order with optional paging.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
readNo
textNo
afterNo
limitNo
beforeNo
cursorNo
fieldsNo
senderNo
starredNo
subjectNo
targetsYes
recipientNo
attachment_filenameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderYes
errorsYes
resultsYes
truncatedYes
next_cursorYes
target_statusesYes
targets_pendingYes
targets_searchedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.11.0
    • addedOutput schema / $defs / SafeErrorOutput
      Added value: +{
      +  "properties": {
      +    "code": {
      +      "enum": [
      +        "partial_move",
      +        "permission_denied",
      +        "not_found",
      +        "invalid_request",
      +        "timeout",
      +        "rate_limited",
      +        "draft_busy",
      +        "recovery_required",
      +        "imap_error",
      +        "connection_error",
      +        "broker_error",
      +        "outcome_unknown"
      +      ],
      +      "title": "Code",
      +      "type": "string"
      +    },
      +    "message": {
      +      "title": "Message",
      +      "type": "string"
      +    },
      +    "reason": {
      +      "anyOf": [
      +        {
      +          "enum": [
      +            "task_rate",
      +            "session_queue_timeout",
      +            "imap_worker_capacity",
      +            "ipc_helper_capacity",
      +            "request_deadline",
      +            "transport_loss"
      +          ],
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Reason"
      +    },
      +    "retry_after_seconds": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Retry After Seconds"
      +    },
      +    "scope": {
      +      "enum": [
      +        "request",
      +        "item",
      +        "account",
      +        "broker",
      +        "client"
      +      ],
      +      "title": "Scope",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message",
      +    "scope",
      +    "reason",
      +    "retry_after_seconds"
      +  ],
      +  "title": "SafeErrorOutput",
      +  "type": "object"
      +}
    • addedOutput schema / $defs / SearchTargetErrorOutput / properties / error / $ref
      Added value: +"#/$defs/SafeErrorOutput"
    • removedOutput schema / $defs / SearchTargetErrorOutput / properties / error / title
      Removed value: -"Error"
    • removedOutput schema / $defs / SearchTargetErrorOutput / properties / error / type
      Removed value: -"string"
    • changedOutput schema / $defs / SearchTargetStatusOutput / properties / error / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "$ref": "#/$defs/SafeErrorOutput"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / $defs / SearchTargetStatusOutput / properties / error / title
      Removed value: -"Error"
  2. Changed3 schema fields changedv0.10.0
    • addedOutput schema / $defs / SearchTargetStatusOutput
      Added value: +{
      +  "properties": {
      +    "account_id": {
      +      "title": "Account Id",
      +      "type": "string"
      +    },
      +    "cursor": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Cursor"
      +    },
      +    "error": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Error"
      +    },
      +    "mailbox": {
      +      "title": "Mailbox",
      +      "type": "string"
      +    },
      +    "status": {
      +      "enum": [
      +        "complete",
      +        "partial",
      +        "error",
      +        "pending"
      +      ],
      +      "title": "Status",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "account_id",
      +    "mailbox",
      +    "status",
      +    "cursor",
      +    "error"
      +  ],
      +  "title": "SearchTargetStatusOutput",
      +  "type": "object"
      +}
    • addedOutput schema / properties / target_statuses
      Added value: +{
      +  "items": {
      +    "$ref": "#/$defs/SearchTargetStatusOutput"
      +  },
      +  "title": "Target Statuses",
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "results",
      -  "errors",
      -  "next_cursor",
      -  "truncated",
      -  "order",
      -  "targets_searched",
      -  "targets_pending"
      -]New value: +[
      +  "results",
      +  "errors",
      +  "next_cursor",
      +  "truncated",
      +  "order",
      +  "targets_searched",
      +  "targets_pending",
      +  "target_statuses"
      +]
  3. Changed5 schema fields changedv0.9.0
    • addedInput schema / $defs
      Added value: +{
      +  "SearchTargetInput": {
      +    "properties": {
      +      "account_id": {
      +        "title": "Account Id",
      +        "type": "string"
      +      },
      +      "mailbox": {
      +        "title": "Mailbox",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "account_id",
      +      "mailbox"
      +    ],
      +    "title": "SearchTargetInput",
      +    "type": "object"
      +  }
      +}
    • removedInput schema / properties / accounts
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "title": "Accounts",
      -  "type": "array"
      -}
    • removedInput schema / properties / mailboxes
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Mailboxes"
      -}
    • addedInput schema / properties / targets
      Added value: +{
      +  "items": {
      +    "$ref": "#/$defs/SearchTargetInput"
      +  },
      +  "title": "Targets",
      +  "type": "array"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "accounts"
      -]New value: +[
      +  "targets"
      +]
  4. First observedv0.1.4

TDQS

C2.9/5.0
Behavior4/5

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

The description adds valuable behavioral context beyond the annotations: results are limited to 1-500 rows, only metadata is returned, ordering is stable, and paging is supported. Annotations already cover safety (read-only, idempotent, non-destructive), so the added ordering and row-limit details are meaningful.

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

Conciseness4/5

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

The description is a single, compact sentence with no redundancy. It front-loads the most important behavioral facts (row range, metadata-only, stable order, paging). However, the extreme brevity comes at the cost of needed information, though that is better captured in contextual completeness.

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

Completeness1/5

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

This is a high-complexity tool with 13 parameters, a nested targets object, and zero schema descriptions, yet the description only offers a one-line summary. It fails to explain required targets structure, available filters, cursor semantics, limit behavior, or field selection, leaving an agent without enough information to call it correctly.

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

Parameters1/5

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

Schema description coverage is 0% and there are 13 parameters, yet the description names none of them and offers no explanation of targets, filters, cursor, limit, fields, or date constraints. The phrase 'optional paging' is the only parameter-related hint, which is far too little to compensate for the coverage gap.

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

Purpose4/5

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

The description clearly indicates a search operation over email metadata with concrete constraints: 1-500 rows, stable mailbox order, and optional paging. It goes beyond a bare restatement of the tool name, though it does not explicitly differentiate itself from similar siblings like get_emails.

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

Usage Guidelines2/5

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

No guidance is given on when to use this tool instead of alternatives such as get_emails or get_email. The only usage hint is 'optional paging,' but there is no when/when-not context, no mention of filter criteria usage, and no sibling routing.

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