SearchArgsSchema#

class langchain_community.tools.gmail.search.SearchArgsSchema[source]#

Bases: BaseModel

Input for SearchGmailTool.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

param max_results: int = 10#

The maximum number of results to return.

param query: str [Required]#

The Gmail query. Example filters include from:sender, to:recipient, subject:subject, -filtered_term, in:folder, is:important|read|starred, after:year/mo/date, before:year/mo/date, label:label_name โ€œexact phraseโ€. Search newer/older than using d (day), m (month), and y (year): newer_than:2d, older_than:1y. Attachments with extension example: filename:pdf. Multiple term matching example: from:amy OR from:david.

param resource: Resource = Resource.MESSAGES#

Whether to search for threads or messages.