Tools
Triple Whale
This guide will help you run the Triplewhale MCP Server as an agent and access its tools in a Meshagent Room in the cloud.
Prerequisites
- Python 3.8+
- Docker
- Triplewhale API Key
Required Environment Variables
- TRIPLEWHALE_API_KEY: Your Triplewhale API key
Example:TRIPLEWHALE_API_KEY=your-triplewhale-api-key-here
Step-by-Step
-
Install Meshagent and all dependencies:
-
Sign up and authenticate with Meshagent:
- Follow the CLI instructions at: Meshagent CLI Getting Started
-
Start the Triplewhale MCP Server in a Meshagent Room:
- This command launches a Meshagent Room (
test
) with the Triplewhale MCP Server exposed inside. The room will automatically close if it becomes inactive.
- This command launches a Meshagent Room (
-
Start a chatbot in the Meshagent Room with the Triplewhale Toolkit:
- This will start a chatbot named
sample
that can use the Triplewhale tools in the room. - Multiple toolkits can be used with the same agent in the room.
- A link to interact with the agent and tools will appear in the output of this command.
- This will start a chatbot named
Tools Available
Tools Provided
Tool | Short Description |
---|---|
moby | moby tool helps users access e-commerce performance data. |
Tool Details
Tool: moby
moby tool helps users access e-commerce performance data. The tool prompts the user to enter their shopId, which is then used for tool as input; shopId is required for this tool.
- API Endpoint:
/willy/moby-chat
- Description: Sends a user question to the Triple Whale API along with their shop ID and API key.
- Request: Requires
shopId
and a question. - Authorization: Uses a user-provided API key (
x-api-key
in header).
Response
The API response is a SimplifiedMobyResponse
object:
- For each valid response:
- Presents the question and a structured answer.
- Mentions if data is available in a recommended visualization format.
- Provides links if similar reports are suggested.
- Concludes with an assistantConclusion to summarize results.
- Error Handling:
- If
isError: true
, the error is displayed. 403 Unauthorized
: “Invalid credentials. Please check your settings.”- Missing
shopId
: prompts for shopId. - Other errors: “Something went wrong. Please try again later.”
401 Unauthorized
: “API key is expired or doesn’t have access to the shop.”
- If
Meshagent & Resources
- Meshagent Home
- Meshagent Room API Getting Started
- Meshagent Room API Overview
- Meshagent MCP Triplewhale Tool Image on Docker Hub
For more on MCP servers and best practices: