Charliehub · by A.N.D.Why

Example · ships with Charlie

Gmail

Searches, reads and drafts your email, and manages labels. It fills Charlie's email job, so another email extension could take its place without Charlie noticing.

What's in the folder

gmail/ ├── manifest.json ├── handlers/ │ ├── search.js read.js draft.js one per tool │ └── list_labels.js create_label.js apply_labels.js └── build/ └── Settings.js Connect Gmail / Disconnect

The manifest

gmail / manifest.json (shortened)
{
  "name": "gmail",
  "description": "Gmail — search, read messages and threads, create drafts, and...",
  "version": "0.2.0",
  "developer": {
    "name": "Andy Dale",
    "contact": "(hidden on this page)"
  },
  "tier": "core",
  "role": "email",
  "connections": [
    {
      "name": "gmail",
      "authType": "oauth2-static",
      "transport": "rest-client"
    }
  ],
  "settings": {
    "component": "./build/Settings.js"
  },
  "instructions": "Sending is off-limits, however you'd reach it. Charlie's Gmai...",
  "tools": [
    {
      "name": "email__search",
      "description": "Search the connected account using Gmail's own search syntax...",
      "input_schema": { ... },
      "handler": "./handlers/search.js",
      "delivery": "narrated",
      "roleScoped": true
    },
    { "name": "email__read" },
    { "name": "email__draft" },
    { "name": "email__list_labels" },
    ... 2 more tools
  ]
}
LineWhat it plugs into
"tools"1 · Tools. Six email tools, each marked roleScoped.
"connections"2 · Connections. The Gmail sign-in.
"instructions"3 · Instructions. Opens with "Sending is off-limits, however you'd reach it."
"settings"4 · Settings. Connect, disconnect, or use your own Google Cloud client.
"role": "email"6 · Roles. Gmail is Charlie's email provider. Only one extension can hold a role at a time.

Ideas to borrow