← back to George Mcp
feat: add gmail_get_attachment MCP tool (wraps George /api/attachment-local)
dacdbfb404ba8da2b292805a36ad633931a7b04a · 2026-07-07 14:14:28 -0700 · Steve
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
Diff
commit dacdbfb404ba8da2b292805a36ad633931a7b04a
Author: Steve <steve@designerwallcoverings.com>
Date: Tue Jul 7 14:14:28 2026 -0700
feat: add gmail_get_attachment MCP tool (wraps George /api/attachment-local)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
index.js | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/index.js b/index.js
index 4443e11..deca998 100755
--- a/index.js
+++ b/index.js
@@ -148,6 +148,22 @@ const TOOLS = [
additionalProperties: false,
},
},
+ {
+ name: "gmail_get_attachment",
+ description:
+ "Download a Gmail attachment (matched by filename substring) from a message and save it under /tmp for local processing. Returns the saved path + byte size + mimeType.",
+ inputSchema: {
+ type: "object",
+ properties: {
+ id: { type: "string", description: "Gmail message id" },
+ filename: { type: "string", description: "Attachment filename or substring to match" },
+ save: { type: "string", description: "Absolute path under /tmp/ to write the file to" },
+ ...ACCOUNT_PROP,
+ },
+ required: ["id", "filename", "save"],
+ additionalProperties: false,
+ },
+ },
{
name: "gmail_list_labels",
description: "List all Gmail labels on the connected account.",
@@ -255,6 +271,11 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
query: { account },
});
break;
+ case "gmail_get_attachment":
+ data = await george("/api/attachment-local", {
+ query: { account, messageId: args.id, filename: args.filename, save: args.save },
+ });
+ break;
case "gmail_list_labels":
data = await george("/api/labels", { query: { account } });
break;
← e616a1b gmail send: pass X-Send-Approval from GEORGE_EXTERNAL_SEND_T
·
back to George Mcp
·
fix gmail_get_attachment: fetch raw bytes + save locally (re b2cbb3d →