authenticate
Establish a session with The Game Crafter's print-on-demand platform to access manufacturing tools for tabletop games. Required before using catalog browsing, project creation, artwork upload, and pricing features.
Instructions
Create a TGC session using stored credentials. Must be called before any tool that requires authentication.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/auth.ts:4-16 (handler)The handler function that executes the "authenticate" tool logic.
export function handleAuthenticate(client: TgcClient) { return async (): Promise<CallToolResult> => { const session = await client.authenticate(); return { content: [ { type: "text", text: `Authenticated successfully as user ${session.user_id}. You can now use tools that require authentication.`, }, ], }; }; } - src/index.ts:76-80 (registration)The registration of the "authenticate" tool in the MCP server.
server.registerTool("authenticate", { description: "Create a TGC session using stored credentials. Must be called before any tool that requires authentication.", annotations: { readOnlyHint: false }, }, withErrorHandling(handleAuthenticate(client)));