MCP ExplorerExplorer

Databutton Mcp Templates

@ElleNealAIon 9 months ago
1 MIT
FreeCommunity
AI Systems
A collection of APIs that can be added to your MCP template. Enabling you to add capabilities to your AI Agent.

Overview

What is Databutton Mcp Templates

databutton-mcp-templates is a collection of APIs designed to enhance the functionality of your MCP template, allowing you to integrate additional capabilities into your AI Agent.

Use cases

Use cases include developing intelligent chatbots, creating data-driven applications, and enhancing existing AI systems with new functionalities.

How to use

To use databutton-mcp-templates, you need to integrate the APIs into your existing MCP template. This typically involves importing the necessary libraries and configuring the APIs to suit your AI Agent’s requirements.

Key features

Key features include a variety of APIs that can be easily added to your MCP template, enabling enhanced functionalities such as data processing, user interaction, and external service integration.

Where to use

databutton-mcp-templates can be used in various fields such as AI development, chatbot creation, and any application that requires enhanced AI capabilities and interaction.

Content

databutton-mcp-templates

A collection of APIs that can be added to your Databutton hosted MCP Server. Enabling you to add capabilities to your AI Agent.

Instructions

  1. Create your Databutton MCP Playghround using this template Databutton Model Context Protocol (MCP) Template
  2. Create a new API in your template application
  3. Copy and paste the selected code from the API templates below
  4. You agent will now be able to use this tool.

API Templates

Search

  • Search the Web using DuckDuckGo: a free websearch tool no API key required. Give your AI Agent the ability to search the internet.
  • URL Content Extractor: Extracts and analyzes content from web pages, filtering out ads and navigation to focus on main text, titles, and descriptions. Perfect companion to web search for deeper analysis of specific pages. Tip: Use after DuckDuckGo search to get comprehensive information from the most relevant results.

Memory

  • Knowledge Base: Enables your AI Agent to store, search, and retrieve domain-specific information without external dependencies. Great for building persistent knowledge about topics, facts, or frequently asked questions. Uses Databutton’s built-in storage for seamless integration. Tip: Add the instruction “Check the knowledge base for relevant information before responding to questions on familiar topics.”
  • Personalisation: Stores key insights about the user to improve AI personalisation such as user preferences, habits or goals. Uses Databutton’s built in storage to save data automatically to your application. Tip: include the following in the Instructions underneath the Chat Inteface “Read the memories of the user before responding or using any tools.”

Creating an Effective API Task for an AI Agent in Databutton

Overview

This guide helps you define a clear API task for an AI agent within Databutton’s Model Context Protocol (MCP) server. By following these best practices, you ensure that the API serves its intended purpose effectively and integrates well into AI-driven workflows.

1. Define Your API Requirements

Before instructing the AI to create an API, answer the following questions:

API Requirements Example Questions

  • What is the purpose of this API?
    • Example: “The API stores conversation history, including user messages, AI responses, and tool usage logs.”
  • When and how should the agent use this tool?
    • Example: “The API should be used after every AI response to persist context for future interactions.”
  • What are the inputs and expected outputs?
    • Example: “Inputs include the user message, AI response, and tools used. Outputs confirm whether the data was stored successfully.”
  • What happens to the inputs to get the outputs?
    • Example: “User interactions are stored in a JSON file under a timestamped key for later retrieval.”
  • Are there any constraints or limitations?
    • Example: “Maximum storage size per conversation should be 100KB. Data retention should follow privacy guidelines.”

2. Writing an Instruction for the AI Agent

Use the following template to instruct the AI agent to create your API task.

Databutton AI Task Instruction Example

Create a task to build a new API within this application.

Do not write a frontend for this; we are only building the API.

{Provide your API requirements here}

Follow best practices for writing clear documentation when building an API for an AI agent to use.

{Include best practice guide and format}

Test the API before marking the task as complete.

### Definition of Done
- The API must meet the defined requirements.
- Documentation should clearly describe when and how the AI should use the API.
- The API should be tested with valid and invalid inputs.
- The response formats must be correct and handled gracefully in case of errors.

3. Best Practices for API Documentation

To ensure clarity and usability, follow these best practices:

Best Practices for API Docstrings

  • Overview: Describe what the API does in one sentence.
  • When to Use: List specific use cases for the API.
  • How to Use: Provide an example JSON request.
  • Response Format: Show both success and failure responses.
  • Limitations: Mention any constraints or potential issues.

Example Docstring for an AI API

Stores conversation history for AI interaction.

### When to Use:
- After an AI response to maintain context.
- When tracking tool usage and AI decisions.

### How to Use:
Send a POST request to `/store-text`:
```json
{
    "user_message": "Hello!",
    "ai_response": "Hi there!",
    "tools_used": [],
    "tool_responses": []
}

Response Format:

Success:

{
    "success": true,
    "message": "Conversation stored."
}

Failure:

{
  "success": false,
  "message": "Storage error."
}

4. Testing and Validation

  • Run the API with test inputs.
  • Verify response correctness.
  • Handle errors gracefully.

By following this structured approach, your API will be well-documented, usable, and effective for AI-driven workflows.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers