WisebotAI
Workflows

Custom tools + MCP validation pack

Build and validate four high-impact custom tools, then verify custom MCP and REST tool calling end-to-end.

Custom tools + MCP validation pack

This guide is the execution pack for shipping:

  1. Graph/report generation tool
  2. PPT generation tool with theme selection
  3. Workflow sync/import tool
  4. Calendar sync tool

And validating:

  • Custom MCP server tool calling
  • REST API tool calling fallback

Prerequisites

  • At least one agent with Custom API Tools enabled in settings.
  • Access to MCP integrations in dashboard (/mcp-integrations).
  • Test API key or JWT for /api/v1/* and /api/chat/agent.
  • One staging org with test data.

Tool 1 - Graph/report generation

Purpose

Given structured input, return graph-ready series and a short narrative summary.

Minimal tool contract

  • Name: generate_report_graph
  • Method: POST
  • Input params: title, series[], xLabel, yLabel
  • Output: { chartSpec, summary, insights[] }

Validation checklist

  • Tool handles small and medium payloads.
  • Output JSON is valid and renderable by frontend/report pipeline.
  • Error path returns helpful message on invalid series input.

Tool 2 - PPT generation with theme

Purpose

Create a downloadable PPT payload from structured content and a selected brand theme.

Minimal tool contract

  • Name: generate_presentation
  • Method: POST
  • Input params: title, slides[], theme, brandColor
  • Output: { fileUrl, slideCount, warnings[] }

Validation checklist

  • theme selection changes output style.
  • brandColor is applied to generated slide accents.
  • Output URL is retrievable and file opens successfully.

Tool 3 - Workflow sync/import

Purpose

Pull workflow definitions from an external system and map to Wisebot workflow format.

Minimal tool contract

  • Name: sync_external_workflow
  • Method: POST
  • Input params: source, apiKeyRef, workflowId
  • Output: { synced, mappedNodes, unmappedFields[] }

Validation checklist

  • Imports valid external workflow data.
  • Reports unsupported nodes explicitly.
  • Generates deterministic mapping for same input.

Tool 4 - Calendar sync

Purpose

Create or update events through calendar APIs for follow-ups, demos, or support escalations.

Minimal tool contract

  • Name: calendar_sync
  • Method: POST
  • Input params: provider, event, attendees[], timezone
  • Output: { eventId, status, joinUrl? }

Validation checklist

  • Works for Google first; adapter structure supports additional providers.
  • Handles timezone and attendee payload validation correctly.
  • Returns deterministic status and event identifier.

Custom MCP validation

Use this sequence to test your self-hosted MCP server:

  1. Connect MCP integration in dashboard.
  2. Confirm tools list is discoverable.
  3. Invoke tool from:
    • Agent custom tool call path
    • Workflow mcp_tool node
  4. Validate response and trace logs.
  5. Test negative case (bad args) and verify error visibility.

Pass criteria

  • Tool list loads.
  • At least one MCP tool call succeeds end-to-end.
  • Error handling path is observable and actionable.

REST tool-calling fallback validation

Use one free public API sandbox endpoint for smoke tests (for example JSONPlaceholder-style test APIs).

  1. Configure a custom API tool in agent settings.
  2. Call it from agent turn with valid parameters.
  3. Re-run with malformed payload to verify validation and error path.

Pass criteria

  • Success path returns structured output in tool result.
  • Failure path returns safe, user-readable error.

Release checklist