Skip to main content
Glama
shahlaukik

Money Manager MCP Server

by shahlaukik

asset_list

Retrieve all assets in a hierarchical structure to track personal finances through the Money Manager MCP Server.

Instructions

Retrieves all assets in a hierarchical structure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the asset_list tool. Fetches asset data from the Money Manager API endpoint /getAssetData, parses input with AssetListInputSchema, calculates total balance using the toNumber helper by summing assetMoney across all assets in groups, and returns AssetListResponse with assetGroups and totalBalance.
    export async function handleAssetList( httpClient: HttpClient, input: unknown, ): Promise<AssetListResponse> { AssetListInputSchema.parse(input); const rawResponse = await httpClient.get<AssetGroup[]>("/getAssetData"); // Calculate total balance from all asset groups let totalBalance = 0; const assetGroups: AssetGroup[] = Array.isArray(rawResponse) ? rawResponse : []; for (const group of assetGroups) { if (group.children) { for (const asset of group.children) { // API returns assetMoney as string, need to parse it totalBalance += toNumber(asset.assetMoney); } } } return { assetGroups, totalBalance, }; }
  • Zod input schema for the asset_list tool, which requires no parameters (empty object). Used for validation in the handler.
    export const AssetListInputSchema = z.object({}); export type AssetListInput = z.infer<typeof AssetListInputSchema>;
  • src/index.ts:217-223 (registration)
    MCP tool registration in the TOOL_DEFINITIONS array, defining the asset_list tool with its name, description, and empty input schema for the Model Context Protocol server.
    name: "asset_list", description: "Retrieves all assets in a hierarchical structure.", inputSchema: { type: "object" as const, properties: {}, }, },
  • Internal registration mapping the 'asset_list' tool name to the handleAssetList handler function in the toolHandlers object, used by executeToolHandler.
    asset_list: handleAssetList,
  • TypeScript interface defining the output structure of the asset_list tool response, including hierarchical assetGroups and computed totalBalance.
    export interface AssetListResponse { assetGroups: AssetGroup[]; totalBalance: 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/shahlaukik/money-manager-mcp'

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