Learn how to setup Claude Desktop to work effectively with Tomba API for code generation and development assistance.
Quick Use
Direct Documentation Reference
In Claude Desktop, you can reference our documentation directly:
Code
Please review the Tomba API documentation at https://docs.tomba.io/llms.txt and help me create a Python client for email verification with async support and proper error handling.
Project Analysis
Code
I'm building an email validation service. Can you analyze the Tomba API documentation at https://docs.tomba.io/llms.txt and suggest the best approach for:1. Real-time email verification2. Bulk email processing3. Rate limiting and caching4. Error handling strategies
Project-level Setup
Method 1: Documentation Preparation
Before starting a coding session, prepare your documentation:
This gives Claude persistent access to the documentation
Method 2: Project Context File
Create a comprehensive project context file:
Code
# Project: Email Validation Service# Technology Stack: Node.js, TypeScript, Express, Redis# API Provider: Tomba.io## Tomba API Documentation[Upload tomba-api-docs.txt here]## Project Requirements- Real-time email verification- Bulk processing capabilities- Rate limiting (100 requests/minute)- Redis caching (1-hour TTL)- Comprehensive error handling- TypeScript throughout- Unit and integration tests## Environment Variables- TOMBA_API_KEY- TOMBA_SECRET_KEY- REDIS_URL- PORT## Current Architecture[Describe your current setup]
Claude Desktop Best Practices
1. Structured Conversations
Start conversations with clear context:
Code
Context: Building a TypeScript Node.js service for email verificationDocumentation: [Upload tomba-api-docs.txt]Current Task: Implement rate limiting with RedisPlease help me create a rate limiting middleware that:1. Uses Redis for distributed rate limiting2. Implements sliding window algorithm3. Returns appropriate HTTP status codes4. Includes retry-after headers5. Logs rate limit violations
2. Incremental Development
Build features step by step:
Session 1: Architecture & Planning
Code
Based on the Tomba API docs, help me design the architecture for an email verification service that needs to handle 10k requests/day with high availability.
Session 2: Core Implementation
Code
Let's implement the core Tomba API client. I need:- TypeScript interfaces for all responses- Proper authentication handling- Request/response interceptors- Error handling for all scenarios
Session 3: Advanced Features
Code
Now let's add advanced features:- Caching with Redis- Rate limiting- Request queuing for bulk operations- Monitoring and metrics
3. Code Review and Optimization
Use Claude for code review:
Code
Please review this Tomba API integration code for:- Security best practices- Performance optimizations- Error handling completeness- Code maintainability- TypeScript type safety[Paste your code here]
Development Workflows
1. API Client Development
Initial Prompt:
Code
Using the uploaded Tomba API documentation, create a complete TypeScript client library with:1. Core client class with authentication2. Service classes for each endpoint group: - Email finder - Email verifier - Domain search - Bulk operations3. Comprehensive TypeScript types4. Error handling with custom error classes5. Rate limiting with exponential backoff6. Request/response logging7. Unit tests with Jest8. Integration examplesPlease start with the project structure and core client class.
2. Integration Development
Prompt for Express.js Integration:
Code
Based on the Tomba API documentation, help me integrate email verification into an Express.js application:1. Middleware for email validation2. Route handlers for verification endpoints3. Background job processing for bulk operations4. Error handling middleware5. Request logging and monitoring6. API documentation with Swagger7. Docker configuration8. Environment-based configurationCurrent Express app structure:[Describe your current setup]
3. Testing Strategy
Comprehensive Testing Prompt:
Code
Help me create a comprehensive testing strategy for my Tomba API integration:1. Unit tests for all service methods2. Integration tests with mock API responses3. Error scenario testing4. Rate limiting tests5. Performance benchmarks6. End-to-end tests7. Test data fixtures8. CI/CD pipeline integrationCurrent testing setup: Jest + Supertest
Code Examples
TypeScript Client Implementation
Prompt:
Code
Create a production-ready TypeScript client for Tomba API with the following specifications:- Singleton pattern for client instance- Configurable base URL and timeouts- Automatic retry with exponential backoff- Request/response interceptors- Comprehensive error handling- Type-safe API methods- Built-in caching support- Request logging
Generated Code Structure:
Code
// types/tomba.tsexport interface TombaConfig { apiKey: string; secretKey: string; baseUrl?: string; timeout?: number; retryAttempts?: number; retryDelay?: number;}export interface EmailVerificationResult { email: string; result: "valid" | "invalid" | "unknown"; score: number; reason: string; // ... other fields from API docs}// client/tomba-client.tsexport class TombaClient { private static instance: TombaClient; private config: Required<TombaConfig>; public static getInstance(config: TombaConfig): TombaClient { if (!TombaClient.instance) { TombaClient.instance = new TombaClient(config); } return TombaClient.instance; } // Implementation details...}
React Integration
Prompt:
Code
Create React components and hooks for Tomba email verification:1. TombaProvider context component2. useEmailVerification hook3. EmailVerificationForm component4. BulkEmailProcessor component5. VerificationResults display component6. Error boundary for API errors7. Loading states and progress indicators8. Form validation integration
Python Async Client
Prompt:
Code
Build a Python async client for Tomba API using aiohttp:1. AsyncTombaClient class2. Async context manager support3. Session management with connection pooling4. Rate limiting with asyncio semaphores5. Retry logic with exponential backoff6. Comprehensive error handling7. Type hints throughout8. Async generators for bulk operations9. Caching with TTL support10. Logging integration
Advanced Use Cases
1. Microservices Architecture
Architecture Planning Prompt:
Code
Help me design a microservices architecture for email validation using Tomba API:Services needed:- Email verification service- Bulk processing service- Cache service (Redis)- Queue service (Bull/Agenda)- API gateway- Monitoring serviceRequirements:- Handle 100k+ requests/day- 99.9% uptime- Horizontal scaling- Circuit breaker pattern- Distributed tracing- Comprehensive monitoringPlease provide:1. Service boundaries and responsibilities2. Inter-service communication patterns3. Data flow diagrams4. Technology recommendations5. Deployment strategy
2. Performance Optimization
Optimization Prompt:
Code
My Tomba API integration is experiencing performance issues:Current metrics:- 500ms average response time- 10% timeout rate- High memory usage- Occasional rate limit errorsPlease analyze and optimize:1. Connection pooling configuration2. Request batching strategies3. Caching implementation4. Memory usage patterns5. Rate limiting logic6. Error recovery mechanismsCurrent implementation:[Paste relevant code]
3. Security Hardening
Security Review Prompt:
Code
Please review my Tomba API integration for security best practices:Areas to examine:1. API key management and rotation2. Request/response data sanitization3. Rate limiting and DDoS protection4. Input validation5. Error message exposure6. Logging security (no sensitive data)7. HTTPS enforcement8. Authentication token handlingCurrent security measures:[Describe current implementation]
File Management Tips
Organizing Documentation
Create Project Folder: Organize files by project
Version Documentation: Keep versions of API docs for reference