Tomtom

Learn how to use Tomtom with Composio

Overview

SLUG: TOMTOM

Description

TomTom provides a suite of location-based services and APIs, including mapping, routing, traffic information, and geofencing, enabling developers to integrate advanced navigation and location functionalities into their applications.

Authentication Details

generic_key
stringRequired

Connecting to Tomtom

Create an auth config

Use the dashboard to create an auth config for the Tomtom toolkit. This allows you to connect multiple Tomtom accounts to Composio for agents to use.

1

Select App

Navigate to Tomtom.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Tomtom Auth Config”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using API Key

1from composio import Composio
2
3# Replace these with your actual values
4tomtom_auth_config_id = "ac_YOUR_TOMTOM_CONFIG_ID" # Auth config ID created above
5user_id = "0000-0000-0000" # UUID from database/app
6
7composio = Composio()
8
9def authenticate_toolkit(user_id: str, auth_config_id: str):
10 # Replace this with a method to retrieve an API key from the user.
11 # Or supply your own.
12 user_api_key = input("[!] Enter API key")
13
14 connection_request = composio.connected_accounts.initiate(
15 user_id=user_id,
16 auth_config_id=auth_config_id,
17 config={"auth_scheme": "API_KEY", "val": {"generic_api_key": user_api_key}}
18 )
19
20 # API Key authentication is immediate - no redirect needed
21 print(f"Successfully connected Tomtom for user {user_id}")
22 print(f"Connection status: {connection_request.status}")
23
24 return connection_request.id
25
26
27connection_id = authenticate_toolkit(user_id, tomtom_auth_config_id)
28
29# You can verify the connection using:
30connected_account = composio.connected_accounts.get(connection_id)
31print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Tomtom toolkit’s playground

Python
1from composio import Composio
2from openai import OpenAI
3import json
4
5openai = OpenAI()
6composio = Composio()
7
8# User ID must be a valid UUID format
9user_id = "0000-0000-0000" # Replace with actual user UUID from your database
10
11tools = composio.tools.get(user_id=user_id, toolkits=["TOMTOM"])
12
13print("[!] Tools:")
14print(json.dumps(tools))
15
16def invoke_llm(task = "What can you do?"):
17 completion = openai.chat.completions.create(
18 model="gpt-4o",
19 messages=[
20 {
21 "role": "user",
22 "content": task, # Your task here!
23 },
24 ],
25 tools=tools,
26 )
27
28 # Handle Result from tool call
29 result = composio.provider.handle_tool_calls(user_id=user_id, response=completion)
30 print(f"[!] Completion: {completion}")
31 print(f"[!] Tool call result: {result}")
32
33invoke_llm()

Tool List

Tool Name: List Map Fonts

Description

Tool to list available font asset versions for map rendering. call after confirming the api key is valid.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Assets Sprites

Description

Tool to list available sprites for a given asset version. use after determining the assetversion.

Action Parameters

apiVersion
stringDefaults to 1
assetCategories
array
assetVersion
stringRequired
key
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List map styles

Description

Tool to list available map styles. use after selecting an asset version to retrieve style options.

Action Parameters

apiVersion
stringRequired
assetCategories
array
assetVersion
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Calculate Route

Description

Tool to calculate driving routes. use when you need directions with optional waypoints and traffic consideration.

Action Parameters

arrive_at
string
avoid
string
depart_at
string
end
stringRequired
instructions_type
stringDefaults to coded
language
stringDefaults to en-GB
report
string
route_type
stringDefaults to fastest
section_type
string
start
stringRequired
traffic
booleanDefaults to True
travel_mode
stringDefaults to car
waypoints
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: EV Charging Stations Availability

Description

Tool to retrieve ev charging station availability info. use when you have the connectorsetid and poiid to get live availability.

Action Parameters

connectorSetID
stringRequired
operatorID
string
poiID
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Flow Segment Data

Description

Tool to retrieve traffic flow data for a specific road segment. use when you need current and free flow speeds for given coordinates.

Action Parameters

format
stringRequired
openLr
boolean
point
stringRequired
style
stringRequired
unit
stringDefaults to KMPH
zoom
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Sprite Versions

Description

Tool to list available sprite asset versions. use when you need to know which sprite versions are available after obtaining a valid api key.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Map Copyrights

Description

Tool to retrieve copyright information for a specific map tile. use when you need to display or verify attribution for a given tile.

Action Parameters

x
integerRequired
y
integerRequired
zoom
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: MAP_DISPLAY_RASTER_TILE

Description

Tool to retrieve a raster map tile for specified coordinates and zoom. use when you need direct tile image data for custom map rendering.

Action Parameters

X
integerRequired
Y
integerRequired
format
stringDefaults to png
language
string
layer
stringDefaults to basic
style
stringDefaults to main
tileSize
integerDefaults to 256
view
stringDefaults to Unified
zoom
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Map Display Static Image

Description

Tool to fetch a static map snapshot given center coords and zoom. use when you need a standalone map image for display.

Action Parameters

bbox
string
center
stringRequired
format
stringDefaults to png
height
integerDefaults to 512
language
string
layer
stringDefaults to basic
markers
string
style
stringDefaults to main
tileSize
integerDefaults to 512
traffic
boolean
view
string
width
integerDefaults to 512
zoom
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Map Display WMS GetMap

Description

Tool to retrieve a map image via wms getmap. use when you need georeferenced map layers for custom rendering.

Action Parameters

bbox
stringRequired
bgcolor
stringDefaults to 0xFFFFFF
crs
string
elevation
string
exceptions
string
format
stringRequired
height
integerRequired
layers
stringRequired
request
stringRequired
service
stringRequired
srs
string
styles
string
time
string
transparent
boolean
version
stringRequired
width
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Matrix Routing

Description

Tool to calculate travel time and distance matrix between multiple locations. use when you require a matrix of travel times and distances between multiple origins and destinations.

Action Parameters

destinations
arrayRequired
options
object
origins
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Reverse Geocode

Description

Tool to convert geographic coordinates into a human-readable address. use when you need to obtain address information from latitude and longitude values.

Action Parameters

allowFreeformNewline
boolean
entityType
string
language
string
lat
numberRequired
lon
numberRequired
number
string
radius
integer
returnRoadUse
boolean
returnSpeedLimit
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Structured Geocode

Description

Tool to convert structured address fields into coordinates. use after collecting street, city, and postal code.

Action Parameters

city
string
countryCode
string
countrySubdivision
string
freeformAddress
string
key
stringRequired
language
string
lat
number
limit
integer
lon
number
municipality
string
postalCode
string
radius
integer
streetName
string
streetNumber
string
view
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Traffic Incidents

Description

Tool to retrieve detailed traffic incidents within a bounding box. use when you need incident details for a defined map area.

Action Parameters

fields
string
format
stringDefaults to json
language
stringDefaults to en-US
max_lat
numberRequired
max_lon
numberRequired
min_lat
numberRequired
min_lon
numberRequired
original_position
boolean
projection
stringDefaults to EPSG4326

Action Response

data
objectRequired
error
string
successful
booleanRequired