Use Cases
See what you can build with Dwizi. These examples show how simple functions become powerful AI tools.
Business Intelligence
Sales Dashboard Tool
export default async function getSalesMetrics(input: {
period: "week" | "month" | "quarter";
region?: string;
}) {
// Connect to your database
const sales = await querySalesData(input.period, input.region);
return {
totalRevenue: sales.reduce((sum, s) => sum + s.amount, 0),
orderCount: sales.length,
averageOrder: sales.reduce((sum, s) => sum + s.amount, 0) / sales.length,
topProducts: getTopProducts(sales),
growth: calculateGrowth(sales)
};
}
What AI can do: "What's our sales performance this quarter in the US?"
Customer Support Assistant
export default async function checkCustomerStatus(input: {
customerId: string;
}) {
const customer = await getCustomerById(input.customerId);
const recentOrders = await getRecentOrders(input.customerId);
const supportTickets = await getSupportTickets(input.customerId);
return {
customer: {
name: customer.name,
status: customer.status,
lifetimeValue: customer.lifetimeValue
},
recentActivity: {
lastOrder: recentOrders[0]?.date,
openTickets: supportTickets.filter(t => t.status === 'open').length,
satisfaction: customer.satisfactionScore
},
recommendations: generateRecommendations(customer, recentOrders)
};
}
What AI can do: "What's the status of customer ACME-123?"
Content Creation
Social Media Post Generator
export default async function generateSocialPost(input: {
topic: string;
platform: "twitter" | "linkedin" | "instagram";
tone: "professional" | "casual" | "humorous";
}) {
const research = await researchTopic(input.topic);
const content = await generateContent(research, input.platform, input.tone);
const hashtags = generateHashtags(input.topic);
return {
content: content,
hashtags: hashtags,
estimatedEngagement: predictEngagement(content, input.platform),
postingTips: getPlatformTips(input.platform)
};
}
What AI can do: "Create a LinkedIn post about our new product launch"
Blog Article Outliner
export default async function createArticleOutline(input: {
topic: string;
audience: "beginners" | "experts" | "general";
length: "short" | "medium" | "long";
}) {
const research = await researchTopic(input.topic);
const structure = analyzeSimilarArticles(input.topic);
return {
title: generateTitle(input.topic, research),
sections: createSections(research, structure, input.audience),
keyPoints: extractKeyPoints(research),
sources: research.sources,
wordCount: estimateWordCount(input.length)
};
}
What AI can do: "Outline a blog post about AI tooling for developers"
Data Processing
CSV Analyzer
export default async function analyzeCSV(input: {
csvUrl: string;
analysis: "summary" | "trends" | "anomalies" | "correlations";
}) {
const data = await fetchAndParseCSV(input.csvUrl);
const cleaned = cleanData(data);
switch (input.analysis) {
case "summary":
return generateSummary(cleaned);
case "trends":
return identifyTrends(cleaned);
case "anomalies":
return detectAnomalies(cleaned);
case "correlations":
return findCorrelations(cleaned);
}
}
What AI can do: "Analyze this sales CSV and show me trends"
Document Processor
export default async function processDocument(input: {
documentUrl: string;
action: "summarize" | "extract" | "translate" | "analyze";
language?: string;
}) {
const content = await extractTextFromDocument(input.documentUrl);
switch (input.action) {
case "summarize":
return summarizeText(content);
case "extract":
return extractKeyInformation(content);
case "translate":
return translateText(content, input.language);
case "analyze":
return analyzeDocument(content);
}
}
What AI can do: "Summarize this quarterly report"
Developer Tools
Code Review Assistant
export default async function reviewCode(input: {
code: string;
language: string;
reviewType: "security" | "performance" | "style" | "bugs";
}) {
const analysis = await analyzeCode(input.code, input.language);
switch (input.reviewType) {
case "security":
return checkSecurity(analysis);
case "performance":
return checkPerformance(analysis);
case "style":
return checkStyle(analysis);
case "bugs":
return findBugs(analysis);
}
}
What AI can do: "Review this JavaScript code for security issues"
API Testing Tool
export default async function testAPI(input: {
endpoint: string;
method: "GET" | "POST" | "PUT" | "DELETE";
headers?: Record<string, string>;
body?: any;
expectedStatus?: number;
}) {
const response = await makeRequest(input);
const validation = validateResponse(response, input.expectedStatus);
return {
status: response.status,
responseTime: response.responseTime,
headers: response.headers,
body: response.body,
validation: validation,
suggestions: generateSuggestions(validation)
};
}
What AI can do: "Test the user registration API endpoint"
Personal Productivity
Email Organizer
export default async function organizeEmails(input: {
emailAccount: string;
days: number;
action: "categorize" | "prioritize" | "summarize";
}) {
const emails = await fetchEmails(input.emailAccount, input.days);
switch (input.action) {
case "categorize":
return categorizeEmails(emails);
case "prioritize":
return prioritizeEmails(emails);
case "summarize":
return summarizeEmails(emails);
}
}
What AI can do: "Organize my emails from the past week"
Task Manager
export default async function manageTasks(input: {
action: "create" | "update" | "list" | "analyze";
task?: Task;
filter?: TaskFilter;
}) {
switch (input.action) {
case "create":
return createTask(input.task);
case "update":
return updateTask(input.task);
case "list":
return listTasks(input.filter);
case "analyze":
return analyzeProductivity(await listTasks());
}
}
What AI can do: "Create a task to review the quarterly budget"
Integration Examples
Slack Bot Actions
export default async function slackAction(input: {
action: string;
channel: string;
user: string;
text?: string;
}) {
switch (input.action) {
case "send_message":
return await sendSlackMessage(input.channel, input.text);
case "get_channel_info":
return await getSlackChannelInfo(input.channel);
case "invite_user":
return await inviteToSlack(input.channel, input.user);
}
}
What AI can do: "Send a message to the #general channel"
GitHub Operations
export default async function githubAction(input: {
action: "create_issue" | "review_pr" | "run_checks";
repo: string;
data: any;
}) {
const client = getGitHubClient();
switch (input.action) {
case "create_issue":
return await client.issues.create({
owner: input.repo.split('/')[0],
repo: input.repo.split('/')[1],
title: input.data.title,
body: input.data.body
});
case "review_pr":
return await reviewPullRequest(client, input.repo, input.data.prNumber);
case "run_checks":
return await runGitHubChecks(client, input.repo, input.data.sha);
}
}
What AI can do: "Create a GitHub issue for the bug report"
Getting Started with These Examples
- Choose a template from the examples above
- Copy the code into Dwizi's tool editor
- Define your input schema (Dwizi helps with this)
- Add your API keys as environment variables
- Test the tool with the Dwizi interface
- Connect to your AI via MCP
Each example becomes a secure, isolated tool that your AI can call instantly.