Skip to main content
Glama

process_gmail_receipts

Process specific Gmail emails as receipts. Pass Gmail message IDs and they'll be converted to PDF, extracted by AI, and added to the user's expense spreadsheet. Max 25 emails per request. Requires Gmail to be connected in ExpenseBot settings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailIdsYesGmail message IDs to process as receipts
accountEmailNoOptional: which Gmail account to use (for users with multiple linked accounts)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
errorNo
messageYes
successYes
emailCountNo
processInfoNo
submissionIdNo
processedItemsNo
spreadsheetUrlNo
reviewExpensesUrlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "emailCount": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "error": {
      +      "type": "string"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "processInfo": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "processingCompleted": {
      +          "type": "boolean"
      +        },
      +        "sessionId": {
      +          "type": "string"
      +        },
      +        "status": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "processedItems": {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "reviewExpensesUrl": {
      +      "type": "string"
      +    },
      +    "spreadsheetUrl": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "submissionId": {
      +      "type": "string"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success",
      +    "message"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "description": "Standard ExpenseBot tool result envelope. `message` is the human-readable summary the AI cites; `data` is the structured payload (totals, breakdowns, ids, etc.). On failure, `success` is false and `error` carries a code/message/hint triple.",
      -  "properties": {
      -    "data": {
      -      "additionalProperties": true,
      -      "description": "Structured payload. Shape varies per tool — common keys: total, breakdown, comparison, sampleMeta, ids, expenseId, reportId, signupUrl, results.",
      -      "type": "object"
      -    },
      -    "error": {
      -      "additionalProperties": true,
      -      "description": "Present only when success === false.",
      -      "properties": {
      -        "code": {
      -          "type": "string"
      -        },
      -        "hint": {
      -          "type": "string"
      -        },
      -        "message": {
      -          "type": "string"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "message": {
      -      "description": "Human-readable result text. Always present on success; prefer rendering this verbatim before any further reasoning.",
      -      "type": "string"
      -    },
      -    "sampleMeta": {
      -      "additionalProperties": true,
      -      "description": "Set when the underlying dataset was truncated. isTruncated=true means the agent saw a sample of `sampleCount` of `totalCount` rows; aggregate totals are still accurate.",
      -      "properties": {
      -        "isTruncated": {
      -          "type": "boolean"
      -        },
      -        "sampleCount": {
      -          "type": "integer"
      -        },
      -        "totalCount": {
      -          "type": "integer"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "success": {
      -      "description": "False on tool errors; check before reading `data`.",
      -      "type": "boolean"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  3. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations indicate readOnlyHint=false and destructiveHint=false, consistent with the write operation described (adding to a spreadsheet). The description adds valuable behavioral context beyond annotations: the pipeline (converted to PDF, AI-extracted, added to sheet), the 25-email cap, and the prerequisite of a connected Gmail account. It doesn't address idempotency or duplicate handling, but given the moderate annotations, the additional detail justifies a 4.

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 two sentences with zero filler. It front-loads the purpose and directly states input, outcome, limit, and prerequisite. Every clause is necessary and informative, making it highly concise and well-structured.

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 tool with a simple 2-parameter schema, an output schema present, and annotations covering safety and world effects, the description covers all essential usage aspects: input type, processing steps, limit, and prerequisite. The output format is likely deferred to the output schema. Minor gaps like error handling or idempotency are not critical given the existing structured data, so a 4 is appropriate.

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

Parameters4/5

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

Schema descriptions already cover both parameters (emailIds and accountEmail) with 100% coverage, giving a baseline of 3. The description adds the key constraint 'Max 25 emails per request' for emailIds and the prerequisite of a connected Gmail, enriching parameter usage. It also clarifies accountEmail's optionality implicitly via 'Requires Gmail to be connected'. This extra guidance raises the score.

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 states the verb 'process', the resource 'specific Gmail emails', and the outcome (converted to PDF, AI-extracted, added to expense spreadsheet). It also specifies the input format (Gmail message IDs) and a hard limit (max 25). While it doesn't explicitly name sibling tools like scan_gmail or scan_gmail_years, the focus on 'specific' emails and message IDs makes the purpose distinct enough. However, an explicit contrast would push it to 5.

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?

The description provides practical constraints: it requires Gmail to be connected and limits to 25 emails per request. It also implies usage by passing specific message IDs, which differentiates from broader scan tools. However, there is no explicit when-to-use versus scan_gmail/scan_gmail_years, and no 'when not to use' guidance. Thus, it gives context but leaves alternative selection to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.