Skip to main content

MCI Tools

Tools are the core building blocks of MCI. They define individual actions that can be executed, such as API requests, CLI commands, file operations, and text generation. This document explains each tool execution type and how to use them effectively.

What are Tools?

A tool in MCI is a reusable definition that specifies:
  • What it does (description)
  • What inputs it accepts (inputSchema)
  • How to execute it (execution configuration)
Tools are the easiest way to define actions for AI agents and applications. They abstract away complexity and provide a consistent interface for different types of operations.

Tool Execution Types

MCI supports four execution types:
  1. HTTP - API requests to web services
  2. CLI - Command-line programs and scripts
  3. File - Reading files with template processing
  4. Text - Simple text generation with templates

HTTP Execution (API Tools)

HTTP execution allows you to define API requests as tools. This is perfect for integrating with REST APIs, webhooks, and web services.

Basic API Request

POST Request with JSON Body

Workflow Integration (n8n, Zapier, Make)

One of the powerful features of HTTP tools is the ability to integrate workflow automation platforms like n8n, Zapier, or Make.com as agent tools: n8n Webhook Example:
Zapier Webhook Example:
This allows agents to leverage complex workflows built in visual automation tools, combining MCI’s simplicity with powerful workflow capabilities.

Authentication Options

API Key in Header:
Bearer Token:
OAuth2:

CLI Execution (Command-Line Tools)

CLI execution allows you to run command-line programs, scripts, and system commands. This is useful for DevOps tasks, data processing, and integrating with existing command-line tools.

Basic Command

Running Script Files

One of the most powerful features of CLI execution is the ability to run script files directly. This works with any scripting language: Python Script:
Node.js Script:
PHP Script:
Compiled Binary:

Dynamic Flags

CLI tools support dynamic flags based on input properties (bool, if true = flag added):

Working Directory

Set a working directory for command execution:

File Execution (Template Files)

File execution reads file contents and processes them with MCI’s templating system. This is the best way to manage prompts because of advanced templating features that all MCI adapters support.

Why File Execution is Best for Prompts

  1. Advanced Templating: Full support for variables, conditionals, and loops
  2. Separation of Concerns: Keep prompts separate from code
  3. Easy Maintenance: Edit prompts without changing code
  4. Version Control: Track prompt changes in your repository
  5. Reusability: Same prompt templates across multiple tools

Basic File Reading

Prompt Template Examples

Simple Prompt (prompts/greeting.txt):
Conditional Prompt (prompts/code-review.txt):
Loop-based Prompt (prompts/batch-analysis.txt):
Note: .lenght supported with Python adapter, since dict already has the needed key.

Advanced Template File

prompts/complex-task.txt:

File Execution Without Templates

You can also read files without template processing:

Text Execution (Simple Templates)

Text execution returns templated text directly from the schema. This is perfect for simple messages, quick responses, or computed strings.

Basic Text

Text with Conditionals

Computed Strings


Comparison Table


Best Practices

1. Choose the Right Type

  • HTTP: When integrating with web APIs or workflow platforms
  • CLI: When running existing scripts or system commands
  • File: When managing complex prompts or templates
  • Text: When generating simple, inline text

2. Use File Execution for Prompts

Not:

3. Leverage Script Execution

Instead of inline commands, use script files:

4. Keep Secrets in Environment Variables

5. Add Descriptive Metadata

6. Use text for static assets

Summary

  • HTTP Tools: Perfect for API integration and workflow automation (n8n, Zapier, Make)
  • CLI Tools: Run scripts (.py, .js, .php) and binaries for DevOps and data processing
  • File Tools: The best way to manage prompts with advanced templating
  • Text Tools: Quick and simple text generation
Each execution type serves a specific purpose. Choose based on your needs, and don’t hesitate to mix different types in the same project.