pocketsmith-mcp
Version:
MCP server for managing budgets via PocketSmith API
124 lines (123 loc) • 3.79 kB
TypeScript
/**
* @fileoverview Get spending categories from PocketSmith
*/
import { z } from "zod";
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { RequestContext } from "../../../utils/index.js";
export declare const GetCategoriesInputSchema: z.ZodObject<{
apiKey: z.ZodOptional<z.ZodString>;
accessToken: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
apiKey?: string | undefined;
accessToken?: string | undefined;
}, {
apiKey?: string | undefined;
accessToken?: string | undefined;
}>;
export type GetCategoriesInput = z.infer<typeof GetCategoriesInputSchema>;
export declare const GetCategoriesResponseSchema: z.ZodObject<{
categories: z.ZodArray<z.ZodObject<{
id: z.ZodNumber;
title: z.ZodString;
colour: z.ZodNullable<z.ZodString>;
is_bill: z.ZodBoolean;
is_transfer: z.ZodBoolean;
parent_id: z.ZodNullable<z.ZodNumber>;
children: z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodNumber;
title: z.ZodString;
colour: z.ZodNullable<z.ZodString>;
}, "strip", z.ZodTypeAny, {
title: string;
id: number;
colour: string | null;
}, {
title: string;
id: number;
colour: string | null;
}>, "many">>;
}, "strip", z.ZodTypeAny, {
title: string;
id: number;
colour: string | null;
is_bill: boolean;
is_transfer: boolean;
parent_id: number | null;
children?: {
title: string;
id: number;
colour: string | null;
}[] | undefined;
}, {
title: string;
id: number;
colour: string | null;
is_bill: boolean;
is_transfer: boolean;
parent_id: number | null;
children?: {
title: string;
id: number;
colour: string | null;
}[] | undefined;
}>, "many">;
summary: z.ZodObject<{
totalCategories: z.ZodNumber;
billCategories: z.ZodNumber;
transferCategories: z.ZodNumber;
parentCategories: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
totalCategories: number;
billCategories: number;
transferCategories: number;
parentCategories: number;
}, {
totalCategories: number;
billCategories: number;
transferCategories: number;
parentCategories: number;
}>;
}, "strip", z.ZodTypeAny, {
summary: {
totalCategories: number;
billCategories: number;
transferCategories: number;
parentCategories: number;
};
categories: {
title: string;
id: number;
colour: string | null;
is_bill: boolean;
is_transfer: boolean;
parent_id: number | null;
children?: {
title: string;
id: number;
colour: string | null;
}[] | undefined;
}[];
}, {
summary: {
totalCategories: number;
billCategories: number;
transferCategories: number;
parentCategories: number;
};
categories: {
title: string;
id: number;
colour: string | null;
is_bill: boolean;
is_transfer: boolean;
parent_id: number | null;
children?: {
title: string;
id: number;
colour: string | null;
}[] | undefined;
}[];
}>;
export type GetCategoriesResponse = z.infer<typeof GetCategoriesResponseSchema>;
export declare function getCategoriesLogic(params: GetCategoriesInput, context: RequestContext): Promise<GetCategoriesResponse>;
export declare const registerGetCategoresTool: (server: McpServer) => Promise<void>;