testing.md 7.0 KB

Tool Test Page

Overview

A sandbox for testing a selected tool by listing its exposed MCP tools and invoking one with custom arguments.

Route

/utilities/testing/tool

Optional query parameter ?tool=<toolId> pre-selects the tool on load (used when navigating from a tool's detail page).

Page Name

"Tool Calling" for title and breadcrumb

Page Layout

[Tool Calling]                       (page title / breadcrumb)

┌─────────────────────────────────────────────────────────────┐
│  Tool                                                       │
│  [Selected tool button]                  [Select tool]      │
└─────────────────────────────────────────────────────────────┘

 (no selection)          (tool selected)
┌──────────────┐         ┌──────────────────────────────────────┐
│  Select a    │   →     │  MCP Tools  +  Tool Call             │
│  tool above  │         │  (single test surface)               │
└──────────────┘         └──────────────────────────────────────┘

Tool Selector

The selected tool is shown in the top selector button (icon + name). If no tool is selected, the page shows a placeholder prompt to select one.

MCP Tools Section

Shows the tool list exposed by the selected server.

┌─────────────────────────────────────────────────────────────┐
│  MCP Tools                                  [List Tools]    │
│                                                             │
│  Result                                                     │
│  ┌───────────────────────────────────────────────────────┐  │
│  │  Tools  (3)                                           │  │
│  │  ┌──────────────────────────────────────────────────┐ │  │
│  │  │  get_weather   Get the weather for a location    │ │  │
│  │  │  list_files    List files in a directory         │ │  │
│  │  │  read_file     Read a file by path               │ │  │
│  │  └──────────────────────────────────────────────────┘ │  │
│  └───────────────────────────────────────────────────────┘  │
└─────────────────────────────────────────────────────────────┘

Behavior:

  • "List Tools" fetches the current MCP tool list for the selected server.
  • The response includes latency and discovered tool entries.
  • Selecting an entry opens it in the Tool Call section.

Tool Call Section

Invokes a single MCP tool by name with user-supplied arguments.

┌─────────────────────────────────────────────────────────────┐
│  Tool Call                                                  │
│                                                             │
│  Tool                                                       │
│  [get_weather ▾]   (select from discovered tools)           │
│                                                             │
│  Schema                                                     │
│  ┌───────────────────────────────────────────────────────┐  │
│  │  { "type": "object",                                  │  │
│  │    "properties": {                                    │  │
│  │      "location": { "type": "string",                  │  │
│  │                    "description": "City name" }       │  │
│  │    },                                                 │  │
│  │    "required": ["location"] }                         │  │
│  └───────────────────────────────────────────────────────┘  │
│                                                             │
│  Arguments                                                  │
│  ┌───────────────────────────────────────────────────────┐  │
│  │  {                                                    │  │
│  │    "location": "San Francisco"                        │  │
│  │  }                                                    │  │
│  └───────────────────────────────────────────────────────┘  │
│                                                    [Call]   │
│                                                             │
│  Result                                                     │
│  ┌───────────────────────────────────────────────────────┐  │
│  │  [text] The weather in San Francisco is sunny...    │  │
│  └───────────────────────────────────────────────────────┘  │
└─────────────────────────────────────────────────────────────┘

Behavior:

  • A discovered tool must be selected before calling.
  • Input schema is shown read-only.
  • Arguments are edited as JSON and validated before submit.
  • Calls are blocked for invalid JSON or missing required fields.
  • Results show latency and output content.
  • Output items are rendered by type: text, image, or resource.

API Behavior

/api/workspaces/[workspaceId]/tools/[id]/test supports:

  • GET: list available MCP tools for the selected server
  • POST: call one MCP tool with JSON arguments

Responses include latency and may include error information.