Skip to main content
Glama

Scaffold the OAuth install flow

scaffold-oauth-callback
Read-onlyIdempotent

Generate Express (TypeScript) OAuth 2 authorization code flow files for Tiendanube/Nuvemshop apps: install redirect with state, code-exchange callback, and per-store token storage.

Instructions

Generate the Express (TypeScript) OAuth 2 authorization code flow of a Tiendanube / Nuvemshop app: install redirect with state, callback that exchanges the code with a JSON body and stores the token per app and store. Returns the files for the caller to write. For a full app, it points to the official templates.

Input Schema

NameRequiredDescriptionDefault
dirNoFolder for the generated files, relative to the project root (default "src")
appIdYesApp ID (client_id) from the Partners Portal
brandNoWhich domain the merchant sees (default tiendanube); the two token URLs are equivalent

Output Schema

NameRequiredDescriptionDefault
filesYesFiles to write. The server never writes to disk.
notesYesNext steps and caveats

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, and the description usefully confirms the mechanism: it 'Returns the files for the caller to write' rather than writing to disk, which explains why a generation tool is marked non-destructive. It adds the token-storage model (per app and store) and the JSON-body exchange detail, though it omits any credential or rate-limit prerequisites.

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?

Two sentences with zero filler, front-loading the framework, language, and flow before the return-and-fallback note. Every clause carries information an agent needs.

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?

With an output schema present, return values needn't be explained, and the description covers scope, the file-return contract, and the template fallback. The remaining gap is minor: no statement of what the caller must have configured (credentials) before invoking it.

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

Parameters3/5

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

Schema description coverage is 100%, so appId, dir, and brand are already documented, including the brand enum and its default. The description adds no parameter-level syntax or format detail beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and artifact: 'Generate the Express (TypeScript) OAuth 2 authorization code flow' for Tiendanube/Nuvemshop, going so far as to enumerate the install redirect, state handling, and callback exchange. This is far more specific than scaffold-webhook-handler's scope, so an agent can distinguish the two without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear context (scaffolding the OAuth install flow) and a fallback pointer: 'For a full app, it points to the official templates,' which implicitly tells the agent this tool is for the OAuth piece only. It stops short of explicitly naming siblings like read-doc or lookup-scope as alternatives for partial needs, so it falls just below the top score.

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