Skip to main content

Tool Marketplace

Two things in one panel​

The Tool Marketplace has two tabs:

  • Tools — custom tools you write in JavaScript or Python that become immediately callable by the agent
  • Servers — external MCP servers you connect via URL or command, adding entire tool suites in one shot

Custom Tools tab​

Custom tools are small functions you write directly in the app, in JavaScript or Python. Once saved, the agent can call them in any goal — no restart, nothing to deploy.

When to use custom tools​

  • You have a private internal API that isn't in the built-in integrations
  • You want a domain-specific utility (e.g., "validate a PAN number", "format an Indian address")
  • You want a reusable calculation (e.g., "calculate GST", "convert USD to INR at live rates")
  • You want a webhook caller with specific headers

Creating a custom tool​

Click + Create Tool:

  1. 1
    Name and describe
    Name: validate_pan
    Description: Validate an Indian PAN card number format and return whether it's valid.
    Tags: india, finance, validation

    The description is what the agent reads to decide whether to use this tool — write it clearly.

  2. 2
    Choose runtime
    • Node.js — best for HTTP requests, JSON manipulation, string processing
    • Python — best for data analysis, scientific computing, pandas/numpy operations
  3. 3
    Write the code

    The tool receives its input as a JSON object. Return the result as a JSON-serializable value.

    Node.js example:

    // Tool: validate_pan
    // Input: { pan: "ABCDE1234F" }
    const { pan } = input;
    const panRegex = /^[A-Z]{5}[0-9]{4}[A-Z]{1}$/;
    return {
    valid: panRegex.test(pan),
    pan: pan,
    message: panRegex.test(pan) ? "Valid PAN format" : "Invalid PAN format"
    };

    Python example:

    # Tool: fetch_nse_price
    # Input: { ticker: "RELIANCE.NS" }
    import yfinance as yf
    ticker = input.get("ticker", "NIFTY50.NS")
    stock = yf.Ticker(ticker)
    info = stock.fast_info
    return {
    "ticker": ticker,
    "price": round(info.last_price, 2),
    "change_pct": round(info.day_change_percent, 2)
    }
  4. 4
    Test before saving

    Click Test → enter sample input as JSON → run. The output appears inline:

    Input: { "pan": "ABCDE1234F" }
    Output: { "valid": true, "pan": "ABCDE1234F", "message": "Valid PAN format" }

    Fix any errors, then save.

AI-generated tools​

Don't want to write code? Click Generate with AI:

Describe what the tool should do:
"Fetch the current USD/INR exchange rate from a free API and return it as a number"

AI Partner generates the code, you review and test it, then save.

Tool metrics​

Each tool shows:

  • Usage count — how many times the agent has called it
  • Success count — successful vs. failed calls
  • Success rate — percentage, shown as a coloured badge

High-usage, high-success-rate tools are good candidates for promotion to built-in MCP tools.


Servers tab​

The Servers tab lets you connect external MCP servers — third-party or custom servers that expose tools via the Model Context Protocol.

What an external MCP server looks like​

An external server is any process that speaks MCP. It could be:

  • A server from the MCP registry (e.g., a database server, a Figma server)
  • Your own custom server running locally or on a VM
  • A vendor's official MCP server (e.g., Stripe's MCP server)

Connecting a server​

Click + Add Server:

  1. 1
    Choose transport type
    TransportWhen to use
    stdioLocal process you start with a command
    SSERemote server accessible via HTTP + Server-Sent Events
    streamable-httpRemote server via HTTP streaming (newer MCP standard)
  2. 2
    For stdio: enter command and args
    Command: npx
    Args: -y @modelcontextprotocol/server-postgres postgresql://localhost/mydb

    AI Partner starts this process and communicates via stdio.

  3. 3
    For SSE/HTTP: enter URL
    URL: https://mcp.mycompany.com/tools

    Optional: OAuth credentials if the server requires authentication.

  4. 4
    Assign to agent profiles (optional)

    You can restrict which agent profiles can use this server's tools. For example, only allow the "Financial Analyst" profile to use a Bloomberg data server.

  5. 5
    Connect and verify

    Click Connect. The server status shows:

    • Connected — tools are available
    • Failed — connection error, with the failure reason
    • Reconnecting — retrying after a drop

    Successfully connected servers show their tool count and tool names.

Server health​

Each connected server shows a health indicator:

  • 🟢 Connected — tools are live and callable
  • 🟡 Reconnecting — temporarily disconnected, attempting to reconnect
  • 🔴 Failed — could not connect; click to see the error

You can reconnect any failed server from the panel without restarting the application.


Assigning tools to agent profiles​

Both custom tools and external server tools can be restricted to specific agent profiles.

Why this matters: if you connect a database server with destructive tools (DROP TABLE, DELETE), you only want those available to a trusted profile — not the general-purpose agent.

Go to Settings → Agent Profiles to set per-profile tool whitelists after adding a server.


Import / Export​

Custom tools can be exported as JSON and imported on another instance:

# Export all tools
**Export** downloads your custom tools as a single file.

# Import tools
**Import** takes that file and adds them to another instance.

Use this to share tools between team members or across development and production instances.