tools-and-context

Register custom tools, connect MCP servers, and manage dynamic context in Tambo.

11.2k|562|Updated Jun 15, 2024
One-click install
npx skills add https://github.com/tambo-ai/tambo --skill tools-and-context
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tools-and-context
Source: https://github.com/tambo-ai/tambo/tree/main/plugins/tambo/skills/tools-and-context
Command: npx skills add https://github.com/tambo-ai/tambo --skill tools-and-context

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables Tambo to register and call custom tools, connect to MCP servers, and manage dynamic context within conversations.

Core Features & Use Cases

  • Define tools that Tambo can call using defineTool and register them with TamboProvider.
  • Connect to external MCP servers to pull data, prompts, or actions into conversations.
  • Add dynamic context helpers and one-time context attachments to tailor each message.
  • Easily extend Tambo with additional data sources and in-app resources to support advanced interactions.

Quick Start

  1. Install the required packages, e.g. npm install @tambo-ai/react zod

  2. Register a tool and wrap your app with TamboProvider: const fetchUserTool = defineTool({ name: "fetchUser", description: "Fetch user by ID", inputSchema: z.object({ userId: z.string() }), tool: async ({ userId }) => fetchUser(userId) });

    <TamboProvider tools={[fetchUserTool]}> <App /> </TamboProvider>;
  3. Connect MCP servers and add context helpers as needed.

Frequently Asked Questions about tools-and-context

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I register custom tools for an AI conversation using TamboProvider?

You register custom tools by defining them with the defineTool function and passing them as an array to the TamboProvider component wrapping your app.

How do I connect MCP servers to pull external data into LLM chats?

You connect MCP servers by configuring the mcpServers property, allowing you to pull external data, prompts, or actions directly into your conversation context.

What is the best way to attach dynamic context to AI messages?

The best way to attach dynamic context is by using contextHelpers for continuous context management or useTamboContextAttachment to include one-time context attachments during chats.

Do I need zod to define custom tools in a React app?

Yes, you need the zod library to define the inputSchema for your custom tools using defineTool, along with the @tambo-ai/react package to provide the TamboProvider.

Can I use in-app resources as context for AI interactions?

Yes, you can extend Tambo with additional in-app resources and external data sources to support advanced interactions using dynamic context helpers and attachments.

When should I use context attachments instead of context helpers?

You should use useTamboContextAttachment for one-time, specific message context, whereas contextHelpers manage continuous dynamic context throughout the conversation.