Skip to main content
Glama
shahlaukik

Money Manager MCP Server

by shahlaukik

init_get_data

Retrieves initial financial data including categories, payment types, asset groups, and multi-book configuration for Money Manager MCP Server.

Instructions

Retrieves initial application data including categories, payment types, asset groups, and multi-book configuration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mbidNoOptional: Money book ID

Implementation Reference

  • The main handler function for the init_get_data tool. It validates input, calls the Money Manager API /getInitData endpoint, and transforms the raw response into the expected InitDataResponse format.
    /** * Handler for init_get_data tool * Retrieves initial application data including categories, payment types, etc. */ export async function handleInitGetData( httpClient: HttpClient, input: unknown, ): Promise<InitDataResponse> { const validated = InitGetDataInputSchema.parse(input); const params: Record<string, string | undefined> = {}; if (validated.mbid) { params["mbid"] = validated.mbid; } const rawResponse = await httpClient.get<RawInitDataResponse>( "/getInitData", params, ); // Transform the raw response to the expected format return { initData: rawResponse.initData, categories: { income: rawResponse.category_0 || [], expense: rawResponse.category_1 || [], }, paymentTypes: rawResponse.payType || [], multiBooks: rawResponse.multiBooks || [], assetGroups: rawResponse.assetGroups || [], assetNames: rawResponse.assetNames || [], }; }
  • Zod schema defining the input for init_get_data tool: optional mbid string.
    /** * Input schema for init_get_data tool */ export const InitGetDataInputSchema = z.object({ mbid: z.string().optional(), }); export type InitGetDataInput = z.infer<typeof InitGetDataInputSchema>;
  • Registration of the handleInitGetData function in the toolHandlers map used for tool execution.
    init_get_data: handleInitGetData,
  • src/index.ts:30-43 (registration)
    MCP protocol tool definition registration, including name, description, and JSON schema for input validation.
    { name: "init_get_data", description: "Retrieves initial application data including categories, payment types, asset groups, and multi-book configuration.", inputSchema: { type: "object" as const, properties: { mbid: { type: "string", description: "Optional: Money book ID", }, }, }, },
  • Registration of the input schema in the ToolSchemas registry for validation lookup.
    init_get_data: InitGetDataInputSchema,

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