get_auth_url
Generate the OAuth2 authorization URL to authenticate and access Google Slides presentations for creating, editing, and managing slide content.
Instructions
Get the OAuth2 authorization URL for Google Slides access
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:138-145 (registration)Registration of the 'get_auth_url' tool, including its name, description, and input schema (no required parameters).{ name: 'get_auth_url', description: 'Get the OAuth2 authorization URL for Google Slides access', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:220-230 (handler)The main handler function for the 'get_auth_url' tool call, which delegates to the auth service and returns a formatted text response with the authorization URL.private async handleGetAuthUrl(): Promise<CallToolResult> { const authUrl = this.auth.getAuthUrl(); return { content: [ { type: 'text', text: `Please visit this URL to authorize the application:\n${authUrl}`, }, ], }; }
- src/auth.ts:30-40 (helper)Supporting helper method in GoogleSlidesAuth class that generates the actual OAuth2 authorization URL with necessary scopes for Google Slides access.getAuthUrl(): string { const scopes = [ 'https://www.googleapis.com/auth/presentations', 'https://www.googleapis.com/auth/drive.file' ]; return this.oauth2Client.generateAuthUrl({ access_type: 'offline', scope: scopes, }); }
- src/index.ts:170-171 (handler)Dispatch case in the main CallToolRequestSchema handler that routes 'get_auth_url' calls to the specific handler method.case 'get_auth_url': return await this.handleGetAuthUrl();