Code & Prompts Examples
This page provides practical examples of prompts, JSON configurations, and procedures for extending the capabilities of your MCP Explorer.
💬 1. Example User Prompts
You can enter these queries into the Chainlit chat input to test the system's reasoning loop:
Standard Tools Queries
- Prompt:
use wikipedia and search for Rabindranath Tagore- Agent Flow: Decides to execute the
wikipediatool, scrapes the summary of Tagore, and uses the text to answer.
- Agent Flow: Decides to execute the
- Prompt:
use arxiv and search for papers on Transformer architectures- Agent Flow: Decides to run the
arxivtool, fetches recent publications matching the query, and formats the abstracts in Markdown.
- Agent Flow: Decides to run the
Combined Tool Queries
- Prompt:
Search wikipedia for the formula of water, then search arxiv for recent papers detailing water purification techniques using that formula.- Agent Flow: Executes a sequential tool-calling chain (first Wikipedia, then uses the extracted data to formulate an Arxiv search query).
🔌 2. Adding a Custom MCP Server
You can extend the agent's capabilities by adding server definitions to mcpConfig.json.
Example: SQLite MCP Server
To allow the agent to read, write, and query a local database:
- Open
mcpConfig.jsonin your workspace. - Add the SQLite server profile to the
mcpServersobject: - Restart your Chainlit server or rebuild the Docker container.
- Ask the agent:
Show the tables in the SQLite database and list their schemas.The agent will call the SQLite server tools dynamically.
🛠️ 3. Adding a Dynamic Tool Initialization
If a new tool requires specific configuration (like environment keys or User-Agents) before loading:
- Open
toolsConfig.json. - Add a new block under
tool_inits: - The loader will execute the
methodscript block viaexec()before registering the tool, resolving any setup dependencies dynamically.