Skip to main content
Glama

list_drafts

Read-only

Retrieve drafts from the authenticated Gmail mailbox with query filters and pagination, optionally including SPAM and TRASH.

Instructions

List drafts in the authenticated user's mailbox.

Args: query: Gmail search syntax filter, e.g. 'to:alice@example.com subject:invoice'. max_results: Maximum number of drafts to return (default 50, max 500). page_token: Continuation token from a previous response for pagination. include_spam_trash: When True, include drafts from SPAM and TRASH.

Returns: Dictionary with drafts, optional next_page_token, and result_size_estimate. Each draft is {"id": draft ID (for get_draft, update_draft, delete_draft and send_draft), "message": ...}, where message is get_message's include_body=False shape: id, thread_id, snippet, label_ids, internal_date, size_estimate, and headers (to, cc, bcc, subject, date, ...). A draft that can't be read (e.g. sent or updated since it was listed) has message {id, thread_id} and an error. On API failure, returns {"error": "..."}.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_drafts"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryNo
page_tokenNo
max_resultsNo
include_spam_trashNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

readOnlyHint=true already declares the safety profile, yet the description adds real behavioral context: per-item partial failure ('a draft that can't be read ... has message {id, thread_id} and an error') and top-level API failure returning {"error": "..."}. It also discloses pagination via next_page_token and result_size_estimate. It stops short of stating ordering or rate-limit behavior.

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 one-line purpose statement is front-loaded and each Args line is informative. The Returns block is the longest section and partly duplicates the output schema, but the partial-failure and error-shape notes justify most of it. Formatting is clean and scannable.

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

Completeness5/5

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

For a four-parameter read tool, the definition covers purpose, every parameter's meaning and limits, pagination, per-item failure, and top-level error handling. Nothing an agent needs in order to call it correctly or interpret results is missing.

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 description coverage is 0%, so the description must carry the burden, and it does: query is explained as Gmail search syntax with a concrete example, max_results has both default (50) and cap (500), page_token is identified as a continuation token from a previous response, and include_spam_trash explains exactly which mailboxes it adds.

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?

States a specific verb and resource with scope: 'List drafts in the authenticated user's mailbox.' The Returns section implicitly differentiates it from related tools by naming get_draft, update_draft, delete_draft, and send_draft as the consumers of the returned draft ID. It never explicitly contrasts with list_messages, so sibling differentiation is only partial.

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

Usage Guidelines3/5

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

Usage context is implied by the resource name ('drafts') and by the note that draft IDs feed into get/update/delete/send_draft, which tells an agent what to do next. There is no explicit statement of when to prefer this over list_messages or search-style alternatives, and no prerequisites are mentioned.

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