From beffc3fd419412ab514f0cbf80bd523b0cc11f29 Mon Sep 17 00:00:00 2001 From: Brian Demers Date: Mon, 9 Mar 2026 17:09:38 -0400 Subject: [PATCH] Fix lint errors --- .../dev/arcade/example/QuickStartExample.java | 36 ++++++++----------- .../example/springai/SpringAIExample.java | 16 ++++----- 2 files changed, 21 insertions(+), 31 deletions(-) diff --git a/arcade-java-example/src/main/java/dev/arcade/example/QuickStartExample.java b/arcade-java-example/src/main/java/dev/arcade/example/QuickStartExample.java index 4bad391..a866c60 100644 --- a/arcade-java-example/src/main/java/dev/arcade/example/QuickStartExample.java +++ b/arcade-java-example/src/main/java/dev/arcade/example/QuickStartExample.java @@ -67,19 +67,16 @@ public static void main(String[] args) { userId); // Print the response from the tool call - logger.info( - """ - Success! Check your email at {} - - You just chained 3 tools together: - 1. Searched Google News for stories about MCP URL mode elicitation - 2. Created a Google Doc with the results - 3. Sent yourself an email with the document link - - Email metadata: {} - """, - userId, - sendEmailResult); + logger.info(""" + Success! Check your email at {} + + You just chained 3 tools together: + 1. Searched Google News for stories about MCP URL mode elicitation + 2. Created a Google Doc with the results + 3. Sent yourself an email with the document link + + Email metadata: {} + """, userId, sendEmailResult); } /** @@ -101,14 +98,11 @@ public static Map authorizeAndRunTool( .status() .filter(status -> status != AuthorizationResponse.Status.COMPLETED) .flatMap(status -> authResponse.url()) - .ifPresent(url -> logger.info( - """ - Click this link to authorize {}: - {}. - The process will continue once you have authorized the app. - """, - toolName, - url)); + .ifPresent(url -> logger.info(""" + Click this link to authorize {}: + {}. + The process will continue once you have authorized the app. + """, toolName, url)); client.auth().waitForCompletion(authResponse); // Execute the tool and extract the output as a Map diff --git a/arcade-java-example/src/main/java/dev/arcade/example/springai/SpringAIExample.java b/arcade-java-example/src/main/java/dev/arcade/example/springai/SpringAIExample.java index 2b4a6b7..aec82cf 100644 --- a/arcade-java-example/src/main/java/dev/arcade/example/springai/SpringAIExample.java +++ b/arcade-java-example/src/main/java/dev/arcade/example/springai/SpringAIExample.java @@ -22,8 +22,7 @@ @SpringBootApplication public class SpringAIExample { - private static final String SYSTEM_PROMPT = - """ + private static final String SYSTEM_PROMPT = """ You are a specialized Music Assistant with access to two MCP tools: get_spotify_state and play_song. Your goal is to provide a seamless, proactive audio experience. Follow these operational guidelines: Context Awareness: Before playing any music, always use get_spotify_state to see if music is already playing. If it is, acknowledge what is currently playing before switching to the new track. @@ -86,14 +85,11 @@ String play(@ToolParam(description = "The name of the artist to play") String na * * @return A string object of the playback state. */ - @Tool( - name = "get_spotify_state", - description = - """ - Get information about the user's current playback state, - including track or episode, and active device. - This tool does not perform any actions. Use other tools to control playback. - """) + @Tool(name = "get_spotify_state", description = """ + Get information about the user's current playback state, + including track or episode, and active device. + This tool does not perform any actions. Use other tools to control playback. + """) String playbackState() { return executeTool("Spotify.GetPlaybackState", Map.of()); }