Skip to main content
Glama
types.ts3 kB
// Type definitions for Actual Budget API export type { Account, Transaction, Category, CategoryGroup, Payee } from './core/types/domain.js'; import { z } from 'zod'; import { ToolSchema } from '@modelcontextprotocol/sdk/types.js'; const _ToolInputSchema = ToolSchema.shape.inputSchema; export type ToolInput = z.infer<typeof _ToolInputSchema>; export interface BudgetFile { id?: string; cloudFileId?: string; name: string; } // Type definitions for tool arguments export const GetTransactionsArgsSchema = z.object({ accountId: z.string(), startDate: z.string().optional(), endDate: z.string().optional(), minAmount: z.number().optional(), maxAmount: z.number().optional(), categoryName: z.string().optional(), payeeName: z.string().optional(), limit: z.number().optional(), }); export type GetTransactionsArgs = z.infer<typeof GetTransactionsArgsSchema>; export const SpendingByCategoryArgsSchema = z.object({ startDate: z.string().optional(), endDate: z.string().optional(), accountId: z.string().optional(), includeIncome: z.boolean().optional(), }); export type SpendingByCategoryArgs = z.infer<typeof SpendingByCategoryArgsSchema>; export const MonthlySummaryArgsSchema = z.object({ months: z.number().optional().default(3), accountId: z.string().optional(), }); export type MonthlySummaryArgs = z.infer<typeof MonthlySummaryArgsSchema>; export const BalanceHistoryArgsSchema = z.object({ accountId: z.string(), includeOffBudget: z.boolean().optional().default(false), months: z.number().optional().default(3), }); export type BalanceHistoryArgs = z.infer<typeof BalanceHistoryArgsSchema>; export const FinancialInsightsArgsSchema = z.object({ startDate: z.string().optional(), endDate: z.string().optional(), }); export type FinancialInsightsArgs = z.infer<typeof FinancialInsightsArgsSchema>; export const BudgetReviewArgsSchema = z.object({ months: z.number().optional().default(3), }); export type BudgetReviewArgs = z.infer<typeof BudgetReviewArgsSchema>; export const UpdateTransactionArgsSchema = z.object({ transactionId: z.string(), categoryId: z.string().optional(), payeeId: z.string().optional(), notes: z.string().optional(), amount: z.number().optional(), }); export type UpdateTransactionArgs = z.infer<typeof UpdateTransactionArgsSchema>; // Additional types used in implementation export interface CategoryGroupInfo { id: string; name: string; isIncome: boolean; isSavingsOrInvestment: boolean; } export interface CategorySpending { name: string; group: string; isIncome: boolean; total: number; transactions: number; } export interface GroupSpending { name: string; total: number; categories: CategorySpending[]; } export interface MonthData { year: number; month: number; income: number; expenses: number; investments: number; transactions: number; } export interface MonthBalance { year: number; month: number; balance: number; transactions: number; }

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