ToolChat

ToolChat

By rectalogic GitHub

PydanticAI LLM chat with MCP server tools

Overview

what is ToolChat?

ToolChat is a chat application that allows users to interact with AI models using MCP (Model Context Protocol) server tools.

how to use ToolChat?

To use ToolChat, run the command uv run toolchat --model gpt-4o-mini --tools tools.yml.sample after configuring your MCP tool servers in a YAML file.

key features of ToolChat?

  • Chat with various AI models using MCP servers.
  • Easy configuration through YAML files.
  • Supports multiple AI tools and models.

use cases of ToolChat?

  1. Engaging in conversations with AI for various applications.
  2. Testing and deploying AI models in a chat environment.
  3. Integrating multiple AI tools for enhanced functionality.

FAQ from ToolChat?

  • What is MCP?

MCP stands for Model Context Protocol, which allows for the integration of various AI tools and models in a chat format.

  • Is ToolChat free to use?

Yes! ToolChat is open-source and free to use.

  • Can I add my own AI models?

Yes! You can configure your own models in the YAML file.

Content

ToolChat

Chat with LLMs using MCP servers.

Configure MCP tool servers in a YAML file and provide path to --tool-servers, enable specific tools with --enable-tool-server. See sample-tools.yml for format.

If the model is multimodal you can also include images, documents etc. in your prompt. See the /help command for details.

Example

Use AWS documentation tool with Gemini Pro 2.5 to search AWS docs:

$ uv run toolchat --model google-gla:gemini-2.5-pro-exp-03-25 --tool-servers sample-tools.yml --enable-tool-server awslabs.aws-documentation-mcp-server
ToolChat - Ctrl-D or /quit to quit
Enter /multi to enter and exit multiline mode, /help for more commands
> look up documentation on S3 bucket naming rule. cite your sources
Okay, I can help with that. I will search for the S3 bucket naming rules
documentation and provide a summary along with the source URL.

Tool search_documentation {'search_phrase': 'S3 bucket naming rules', 'limit': 1}

Okay, I found a relevant document. I will now read the content to summarize the
S3 bucket naming rules.

Tool read_documentation {'url': 'https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html'}

Okay, here is a summary of the naming rules for Amazon S3 general purpose
buckets, based on the official AWS documentation:

S3 General Purpose Bucket Naming Rules:

 • Length: Must be between 3 and 63 characters long.
 • Characters: Can only contain lowercase letters (a-z), numbers (0-9), periods
   (.), and hyphens (-).
 • Start/End: Must begin and end with a letter or number.
 ...[elided]
No tools information available.
No content found.