pocketsmith-mcp
Version:
MCP server for managing budgets via PocketSmith API
94 lines (93 loc) • 3.1 kB
TypeScript
/**
* @fileoverview Create a new spending category in PocketSmith
*/
import { z } from "zod";
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { RequestContext } from "../../../utils/index.js";
export declare const CreateCategoryInputSchema: z.ZodObject<{
apiKey: z.ZodOptional<z.ZodString>;
accessToken: z.ZodOptional<z.ZodString>;
title: z.ZodString;
colour: z.ZodOptional<z.ZodString>;
parentId: z.ZodOptional<z.ZodNumber>;
isBill: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
isTransfer: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
}, "strip", z.ZodTypeAny, {
title: string;
isBill: boolean;
isTransfer: boolean;
apiKey?: string | undefined;
accessToken?: string | undefined;
colour?: string | undefined;
parentId?: number | undefined;
}, {
title: string;
apiKey?: string | undefined;
accessToken?: string | undefined;
colour?: string | undefined;
parentId?: number | undefined;
isBill?: boolean | undefined;
isTransfer?: boolean | undefined;
}>;
export type CreateCategoryInput = z.infer<typeof CreateCategoryInputSchema>;
export declare const CreateCategoryResponseSchema: z.ZodObject<{
category: 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>;
parent_title: z.ZodOptional<z.ZodString>;
created_at: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
title: string;
id: number;
colour: string | null;
is_bill: boolean;
is_transfer: boolean;
parent_id: number | null;
created_at?: string | undefined;
parent_title?: string | undefined;
}, {
title: string;
id: number;
colour: string | null;
is_bill: boolean;
is_transfer: boolean;
parent_id: number | null;
created_at?: string | undefined;
parent_title?: string | undefined;
}>;
success: z.ZodBoolean;
message: z.ZodString;
}, "strip", z.ZodTypeAny, {
message: string;
category: {
title: string;
id: number;
colour: string | null;
is_bill: boolean;
is_transfer: boolean;
parent_id: number | null;
created_at?: string | undefined;
parent_title?: string | undefined;
};
success: boolean;
}, {
message: string;
category: {
title: string;
id: number;
colour: string | null;
is_bill: boolean;
is_transfer: boolean;
parent_id: number | null;
created_at?: string | undefined;
parent_title?: string | undefined;
};
success: boolean;
}>;
export type CreateCategoryResponse = z.infer<typeof CreateCategoryResponseSchema>;
export declare function createCategoryLogic(params: CreateCategoryInput, context: RequestContext): Promise<CreateCategoryResponse>;
export declare const registerCreateCategoryTool: (server: McpServer) => Promise<void>;