spring-ai-playground

title: Default Tool Examples description: Default Tools - Examples reference. 10 starter tools covering web fetch, datetime, productivity, search, AI, and messaging.

Default Tools - Examples

The ten tools in default-tool-specs.json are the starter examples. They span the surfaces a beginner is likely to want first - fetch a web page, get the current time, draft an email, add a calendar event, show a location on a map, upload a file, look up weather, search the web, call an LLM, send a Slack message - and double as ready-to-copy templates for the helper API you will use in your own tools.

Three of the ten need an API key or webhook URL to be useful (googlePseSearch, openaiResponseGenerator, sendSlackMessage). The rest work out of the box on a fresh install - getCurrentTime and evalExpression are members of every shipped preset because they have no dependency at all.

All 10 inherit Tool Studio’s default sandbox: deny-first class allowlist, no filesystem, network in strict or host-allowlist mode with the SSRF four-layer guard for the tools that fetch.

The 10 examples { #the-examples }

extractPageContent 🆓
:material-language-html5:
web · example L3
Fetches a web page and extracts its main readable content + outbound links. Uses the host-injected fetch (SSRF-defended in `strict` mode) and safety.parser.html for parsing.
**Params**   `pageUrl`
**Env**       -
Click for full reference · params · sandbox · JS source
getCurrentTime 🆓
:material-clock-outline:
datetime · example · util L0
Returns the current time in ISO 8601 format. If the user specifies a city, country, or location, the agent should first map it to an IANA time zone and supply it via the timeZone parameter. If no time zone is provided, UTC is used.
**Params**   `timeZone`
**Env**       -
Click for full reference · params · sandbox · JS source
sendEmail 🆓
:material-email-outline:
productivity · util L0
Drafts an email and renders a **Send email** action card in chat - the user clicks to send it from their own mail app (review-then-send).
**Params**   `to` · `cc` · `subject` · `body`
**Env**       -
Click for full reference · params · sandbox · JS source
addToCalendar 🆓
:material-calendar-plus:
productivity · util L0
Builds a calendar event and renders an **Add to calendar** action card in chat - a dropdown to add the event to Google Calendar, Outlook, or Yahoo Calendar, or to get a standard `.ics` file (the `.ics` opens directly in your calendar app on the desktop, or downloads in a browser).
**Params**   `title` · `start` · `end` · `location` · `description`
**Env**       -
Click for full reference · params · sandbox · JS source
showLocation 🆓
:material-map-marker:
productivity · util L0
Renders an interactive Google Map of a place directly in the chat - no API key needed.
**Params**   `query` · `label`
**Env**       -
Click for full reference · params · sandbox · JS source
requestFileUpload 🆓
:material-file-upload-outline:
productivity · util L0
Asks the user to upload a file (CSV, Excel, image, or any document) and returns its workspace path - the chat opens an upload dialog.
**Params**   `prompt` · `accept`
**Env**       -
Click for full reference · params · sandbox · JS source