@kakaopay-develop/agent-toolkit
Version:
KakaoPay Agent Toolkit
53 lines (46 loc) • 1.27 kB
TypeScript
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { z } from 'zod';
import * as axios from 'axios';
type Context = {
cid?: string;
};
type Configuration = {
actions: {
[product: string]: {
[action: string]: boolean;
};
};
context?: Context;
};
declare class KakaoPayAgentToolkit extends McpServer {
private _kakaopay;
constructor({ secretKey, configuration, }: {
secretKey: string;
configuration: Configuration;
});
}
declare class KakaoPayClient {
private client;
constructor(secretKey: string);
post<T>(url: string, data?: any): Promise<axios.AxiosResponse<T>>;
}
type Tool = {
method: string;
name: string;
description: string;
parameters: z.ZodObject<any, any, any, any>;
actions: {
[key: string]: {
[action: string]: boolean;
};
};
execute: (_client: KakaoPayClient, _context: Context, _params: any) => Promise<any>;
};
declare class KakaoPayAPI {
kakaoPayClient: KakaoPayClient;
context: Context;
tools: Tool[];
constructor(secretKey: string, context?: Context);
run(method: string, arg: any): Promise<string>;
}
export { KakaoPayAPI, KakaoPayAgentToolkit, type Tool };