Skip to main content
Glama
category-classifier.ts737 B
import type { Category } from '../../types.js'; export class MonthlySummaryCategoryClassifier { classify(categories: Category[]): { incomeCategories: Set<string>; investmentSavingsCategories: Set<string>; } { const incomeCategories = new Set<string>(); const investmentSavingsCategories = new Set<string>(); categories.forEach((cat) => { if (cat.is_income) incomeCategories.add(cat.id); if ( cat.name.toLowerCase().includes('investment') || cat.name.toLowerCase().includes('vacation') || cat.name.toLowerCase().includes('savings') ) { investmentSavingsCategories.add(cat.id); } }); return { incomeCategories, investmentSavingsCategories }; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/s-stefanov/actual-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server