import { z } from "zod";
import { StargateTool } from "@sierai/stargate-toolmaker";

const executeTool = new StargateTool({
  name: "executeTool",
  description:
    "This tool will execute the tool based on the tool schema from the getProviderToolSchemas tool",
  schema: z.object({
    provider: z
      .string()
      .describe("Name of the provider to execute the tool for"),
    method: z.string().describe("Name of the method to execute"),
    parameters: z.unknown().describe("Parameters to execute the method"),
  }),

  runner: async (input, config, oauthProvider) => {
    return JSON.stringify(input);
  },
});

export default executeTool;
