Skip to content
Agentmart
Submit a tool

gw-api

Call ANY Google API method via the generic Discovery invoker — services with no curated command group (Drive, Slides, People, Chat, Keep, Meet, Classroom…

Skill by Elnora-AI

IndexedApache-2.0★ 2
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/elnora-ai-gw-api

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Call ANY Google API method via the generic Discovery invoker — services with no curated command group (Drive, Slides, People, Chat, Keep, Meet, Classroom, Apps Script, Admin SDK, ...) and uncovered methods on curated ones. Includes schema introspection, dry-run validation, NDJSON pagination, and a destructive-method guard. TRIGGERS: "google api", "gw api", "api call", "discovery", "drive api", "slides", "people api", "contacts", "chat api", "admin sdk", "apps script", "classroom", "any google service", "api schema"

Use cases: presentations, backend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/gw-api

What's inside

Skill name
gw-api
Description
Call ANY Google API method via the generic Discovery invoker — services with no curated command group (Drive, Slides, People, Chat, Keep, Meet, Classroom, Apps Script, Admin SDK, ...) and uncovered methods on curated ones. Includes schema introspection, dry-run validation, NDJSON pagination, and a destructive-method guard. TRIGGERS: "google api", "gw api", "api call", "discovery", "drive api", "slides", "people api", "contacts", "chat api", "admin sdk", "apps script", "classroom", "any google service", "api schema"
License
Apache-2.0
Instructions
138 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Generic Google API Invoker

## Invocation

```bash
CLI="python3 ${CLAUDE_PLUGIN_ROOT}/cli/gw.py"
```

## When to Use

- **Prefer the curated groups** (`gmail`, `calendar`, `sheets`, `docs`, `tasks`, `forms`) for anything they cover — they have task-shaped flags and validated response shapes.
- **Use `gw api`** for everything else: services without a curated group, or curated services' methods the groups don't expose.
- SERVICE is an alias (`gw api list` shows all 18) or the `api:version` escape hatch for any Google API, e.g. `admin:directory_v1`.

## Workflow: schema → dry-run → call

Always resolve the method shape before calling:

```bash
# 1. Find the service and browse its surface
$CLI api list --compact
$CLI api describe gmail --compact                    # top-level resources
$CLI api describe gmail users.messages --compact     # methods on a resource

# 2. Inspect the method: params, required scopes, request/response schema
$CLI schema gmail.users.messages.list --compact

# 3. Validate the call without executing (offline, no auth needed)
$CLI api call gmail users.messages.list --params '{"userId":"me","maxResults":5}' --dry-run

# 4. Execute
$CLI api call gmail users.messages.list --params '{"userId":"me","maxResults":5}' --compact
```

`--dry-run` prints `{service, method, httpMethod, uri_template, params, body, required_scopes, destructive}` and catches unknown/missing-required params before any network call.

## The discovery document is the contract, not the published examples

A vendor's documentation shows what usually works. The discovery document defines what is
guaranteed. When they disagree, the published example is the one that can change.

This matters most for **enums**, which are the cheapest thing to get wrong and the hardest to
debug, because a rejected enum reports as a generic 400 rather than as "that value is not in the
list". Fetch the document and read the enum yourself:

```bash
# Any Google API, no auth, no gw needed
curl -s "https://<api>.googleapis.com/\$discovery/rest?version=<version>" -o /tmp/d.json

# The enum for one request field
python3 -c "import json;d=json.load(open('/tmp/d.json'));print(d['schemas']['<RequestSchema>']['properties']['<field>']['enum'])"
```

Two things this catches that reading the docs does not:

**Casing.** Published examples routinely use lower camel case for values the discovery document
spells in upper snake case. The API often accepts both, but only one of those is promised. Send
the documented enum spelling and accept either from your own callers.

**Narrower sub-enums.** The same concept can have a wider enum in one field than another. A
dimension you may group by is not necessarily a dimension you may filter on, and the two enums
sit in different schemas. Comparing them is how you find that out before a user does.

`$CLI schema <service>.<resource>.<method>` surfaces the same material through gw. Pass
`--depth 0 --compact` for parameters and required scopes at a fraction of the size; the default
depth expands referenced schemas and can return tens of kilobytes for one method.

## A validator answers the question it was given

Before trusting any `check`, `validate` or `compatibility` endpoint, read its request schema for
a filter field. Several of them accept a parameter that narrows the response to one class of
result, and passing the value you are hoping for makes the endpoint incapable of telling you
otherwise. The verdict then describes what survived the filter rather than what you asked about.

The tell is response size. An answer about the handful of fields you named should be small. If a
validator returns tens of kilobytes, it is answering a wider question than you asked, and the
part you care about is buried in it.

## Commands

```bash
$CLI api call SERVICE METHOD_PATH [--params '{json}'] [--json '{body}' | --json-file PATH] \
    [--dry-run] [--page-all] [--page-limit 10] [--page-delay-ms 100] [--confirm] \
    [--no-cache] [--account NAME] --compact
$CLI api list --compact
$CLI api describe SERVICE [RESOURCE.PATH] [--full] --compact
$CLI schema SERVICE.RESOURCE.METHOD [--depth 3] --compact
```

- `METHOD_PATH` is the dotted resource path from the Discovery doc (`users.messages.list`).
- `--params` = method (query/path) parameters; `--json` / `--json-file` = request body.

## Pagination

`--page-all` follows `nextPageToken` and emits **NDJSON** — one JSON object per page on stdout. Bound it with `--page-limit` (default 10 pages):

```bash
$CLI api call drive files.list --params '{"pageSize":100,"q":"trashed=false"}' --page-all --page-limit 5
```

Without `--page-all` you get a single call with the normal JSON envelope.

## Destructive-Method Guard

Methods ending in `delete`/`clear`/`remove`/`trash`/`stop`/`revoke` (or with HTTP DELETE) refuse to run without `--confirm` (error code `CONFIRM_REQUIRED`).

**Get explicit user confirmation before adding `--confirm` — never self-confirm a destructive call.** Use `--dry-run` first to show the user exactly what would execute. `GW_API_CONFIRM=off` disables the guard (power users only).

```bash
# Show the user what would happen, then (after they approve):
$CLI api call gmail users.messages.trash --params '{"userId":"me","id":"MSG_ID"}' --dry-run
$CLI api call gmail users.messages.trash --params '{"userId":"me","id":"MSG_ID"}' --confirm
```

## Examples

```bash
# Drive: search files (no curated drive group needed)
$CLI api call drive files.list --params '{"q":"name contains \"report\"","pageSize":10}' --compact

From Elnora-AI/elnora-google-workspace, Apache-2.0.

More from Elnora-AI/elnora-google-workspace

Signals

Stars
2
Forks
0
Open issues
0
Last commit (this folder)
Sep 8, 2026 (1 month ago)
Last release
Oct 23, 2026 (5 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Elnora-AI

Cite this page

gw-api skill. Agent Mart. https://agentmart.dev/skills/elnora-ai-gw-api (last updated 2026-10-24)