Files

45 lines
3.9 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TOOLS = void 0;
const zod_to_json_schema_1 = require("zod-to-json-schema");
const schemas_1 = require("./schemas");
function makeTool(name, description, schema) {
const jsonSchema = (0, zod_to_json_schema_1.zodToJsonSchema)(schema, {
name,
$refStrategy: 'none',
});
const definition = jsonSchema.definitions?.[name] ?? jsonSchema;
definition.additionalProperties = false;
return {
name,
description,
inputSchema: definition,
};
}
exports.TOOLS = [
makeTool('suno_generate_music', 'Generate music from a text prompt. Cost: 12 credits. Returns 2 tracks. Use customMode=true for full control (style, title, lyrics).', schemas_1.GenerateMusicSchema),
makeTool('suno_generate_lyrics', 'Generate lyrics from a topic. Cost: 0.4 credits.', schemas_1.GenerateLyricsSchema),
makeTool('suno_generate_sounds', 'Generate sound effects / ambient loops. Cost: 2.5 credits. Model V5 only.', schemas_1.GenerateSoundsSchema),
makeTool('suno_extend_music', 'Extend an existing track. Cost: 12 credits. Set defaultParamFlag=false to reuse source parameters.', schemas_1.ExtendMusicSchema),
makeTool('suno_replace_section', 'Replace a time segment of a track. Cost: 5 credits. Provide start/end seconds.', schemas_1.ReplaceSectionSchema),
makeTool('suno_add_vocals', 'Generate vocals over an instrumental track. Cost: 12 credits.', schemas_1.AddVocalsSchema),
makeTool('suno_add_instrumental', 'Generate backing music for a vocal/melody track. Cost: 12 credits.', schemas_1.AddInstrumentalSchema),
makeTool('suno_upload_and_cover', 'Upload an audio file URL and create a cover in a new style. Cost: 12 credits. Audio must be <= 8 minutes.', schemas_1.UploadAndCoverSchema),
makeTool('suno_upload_and_extend', 'Upload an audio file URL and extend it. Cost: 12 credits.', schemas_1.UploadAndExtendSchema),
makeTool('suno_separate_vocals', 'Separate vocals from music. Cost: 10 credits.', schemas_1.SeparateVocalsSchema),
makeTool('suno_separate_stems', 'Advanced stem separation (per-instrument). Cost: 20 credits.', schemas_1.SeparateStemsSchema),
makeTool('suno_create_video', 'Create an MP4 video from a music track. Cost: 2 credits.', schemas_1.CreateVideoSchema),
makeTool('suno_create_cover', 'Generate a cover image for a track. Cost: 0 credits.', schemas_1.CreateCoverSchema),
makeTool('suno_convert_to_wav', 'Convert a track to WAV format. Cost: 0.4 credits.', schemas_1.ConvertToWavSchema),
makeTool('suno_boost_style', 'Enhance a short style description into a detailed prompt. Cost: 0.4 credits.', schemas_1.BoostStyleSchema),
makeTool('suno_generate_persona', 'Create a reusable persona from a track. Cost: 0 credits.', schemas_1.GeneratePersonaSchema),
makeTool('suno_generate_mashup', 'Create a mashup from exactly 2 audio URLs. Cost: 12 credits.', schemas_1.GenerateMashupSchema),
makeTool('suno_get_task_status', 'Check music/extend/cover task status and get resulting tracks including prompt, title, tags and audio_url. Cost: 0 credits.', schemas_1.GetTaskStatusSchema),
makeTool('suno_get_timestamped_lyrics', 'Get timestamped lyrics for a track. Cost: 0.5 credits.', schemas_1.GetTimestampedLyricsSchema),
makeTool('suno_get_lyrics_details', 'Get details of a lyrics generation task. Cost: 0 credits.', schemas_1.GetLyricsDetailsSchema),
makeTool('suno_get_wav_details', 'Get details of a WAV conversion task. Cost: 0 credits.', schemas_1.GetWavDetailsSchema),
makeTool('suno_get_vocal_separation_details', 'Get details of a vocal/stem separation task. Cost: 0 credits.', schemas_1.GetVocalSeparationDetailsSchema),
makeTool('suno_get_video_details', 'Get details of a music video task. Cost: 0 credits.', schemas_1.GetVideoDetailsSchema),
makeTool('suno_get_credits', 'Get remaining Suno API credits. Cost: 0 credits.', schemas_1.GetCreditsSchema),
];
//# sourceMappingURL=tools.js.map