Skip to content

MCP: clarify search_message_bodies tool schema#14

Closed
endolith wants to merge 3 commits into
split/pr4-search-message-bodiesfrom
cursor/mcp-search-bodies-schema-cb0f
Closed

MCP: clarify search_message_bodies tool schema#14
endolith wants to merge 3 commits into
split/pr4-search-message-bodiesfrom
cursor/mcp-search-bodies-schema-cb0f

Conversation

@endolith

Copy link
Copy Markdown
Owner

Documents search_message_bodies MCP tool behavior so agents interpret queries and responses correctly.

Changes (one commit each)

  1. FTS query syntax — space-separated terms are ANDed; double-quoted strings match exact phrases; OR/NOT unsupported.
  2. Filters vs free text — Gmail operators (from:, subject:, etc.) are metadata filters and do not satisfy the free-text requirement; unrecognized word:value tokens (e.g. RXD2:V2) are literal body text. Error message expanded accordingly.
  3. context_snippets_truncated — when true, more than five match excerpts were returned; use search_in_message or get_message for the full body.

Each change includes schema contract tests in internal/mcp/server_test.go.

Open in Web Open in Cursor 

cursoragent and others added 3 commits June 22, 2026 20:57
Clarify in the tool and query parameter descriptions that space-separated
terms are ANDed, double-quoted strings match exact phrases, and OR/NOT
are unsupported. Add a schema contract test.

Co-authored-by: endolith <endolith@gmail.com>
Document that Gmail operators are metadata filters (not body search terms)
and that unrecognized word:value tokens are literal text. Expand the
filter-only error message and add schema contract tests.

Co-authored-by: endolith <endolith@gmail.com>
Explain in the tool description that the flag means more than five match
excerpts were found and callers should use search_in_message or
get_message for the full body. Add a handler test and schema contract test.

Co-authored-by: endolith <endolith@gmail.com>
@endolith

Copy link
Copy Markdown
Owner Author

Close in favor of #15

@endolith endolith closed this Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants